-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8ace3a9
commit 40cddc7
Showing
52 changed files
with
167 additions
and
3 deletions.
There are no files selected for viewing
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
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,43 @@ | ||
import SpaceSector from "./SpaceSector" | ||
|
||
/** | ||
* Map Generator. | ||
*/ | ||
export default class MapGenerator { | ||
|
||
readonly spaceSectors : SpaceSector[] | ||
|
||
constructor(playerCount: number) { | ||
if (playerCount > 2) { | ||
this.spaceSectors = INITIAL_SETUP_PLAYER_34 | ||
} | ||
else { | ||
this.spaceSectors = INITIAL_SETUP_PLAYER_12 | ||
} | ||
} | ||
|
||
|
||
} | ||
|
||
const INITIAL_SETUP_PLAYER_34 : SpaceSector[] = [ | ||
new SpaceSector('10'), | ||
new SpaceSector('01'), | ||
new SpaceSector('05'), | ||
new SpaceSector('09'), | ||
new SpaceSector('02'), | ||
new SpaceSector('03'), | ||
new SpaceSector('06'), | ||
new SpaceSector('08'), | ||
new SpaceSector('04'), | ||
new SpaceSector('07') | ||
] | ||
|
||
const INITIAL_SETUP_PLAYER_12 : SpaceSector[] = [ | ||
new SpaceSector('01'), | ||
new SpaceSector('05', true), | ||
new SpaceSector('02'), | ||
new SpaceSector('03'), | ||
new SpaceSector('06', true), | ||
new SpaceSector('04'), | ||
new SpaceSector('07', true) | ||
] |
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,16 @@ | ||
/** | ||
* Space sector tile | ||
*/ | ||
export default class SpaceSector { | ||
|
||
readonly id: string | ||
readonly outline: boolean | ||
rotation: number | ||
|
||
constructor(id: string, outline?: boolean) { | ||
this.id = id | ||
this.outline = outline ?? false | ||
this.rotation = 0 | ||
} | ||
|
||
} |