-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Coordinate + Locations classes to track start and end of words
- Loading branch information
1 parent
2df2bcb
commit 675c805
Showing
5 changed files
with
54 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.cse3310; | ||
|
||
class Coordinate { | ||
public int x; | ||
public int y; | ||
|
||
public void Coordinate(int x, int y){ | ||
this.x = x; | ||
this.y = y; | ||
} | ||
|
||
public void getCoordinate(){ | ||
return int[] location = new int[] {x, y}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.cse3310; | ||
|
||
import java.util.HashMap; | ||
|
||
class Locations { | ||
static HashMap <String, Coordinate[]> locationMap; | ||
|
||
public int[] getStart(String s){ | ||
return (locationMap.get(s)[0]).getCoordinate; | ||
} | ||
|
||
public int[] getEnd(String s){ | ||
return (locationMap.get(s)[1]).getCoordinate; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,5 @@ public class UserEvent { | |
int GameId; | ||
User UserId; | ||
int Button[][]; | ||
String message; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters