skeleton: Added initial skeleton files
This commit is contained in:
parent
b6dccbd506
commit
d2fc9cc781
12
src/comp1110/ass2/skeleton/board.java
Normal file
12
src/comp1110/ass2/skeleton/board.java
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
package comp1110.ass2.skeleton;
|
||||||
|
|
||||||
|
public class board {
|
||||||
|
public final island[] islands;
|
||||||
|
public final stoneCircle[] stoneCircles;
|
||||||
|
|
||||||
|
public board(island[] islands, stoneCircle[] stoneCircles) {
|
||||||
|
this.islands = islands;
|
||||||
|
this.stoneCircles = stoneCircles;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
15
src/comp1110/ass2/skeleton/island.java
Normal file
15
src/comp1110/ass2/skeleton/island.java
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
package comp1110.ass2.skeleton;
|
||||||
|
|
||||||
|
public class island {
|
||||||
|
public final int width;
|
||||||
|
public final int height;
|
||||||
|
public tile[][] tiles;
|
||||||
|
public final int score;
|
||||||
|
|
||||||
|
public island(int width, int height, int score) {
|
||||||
|
this.width = width;
|
||||||
|
this.height = height;
|
||||||
|
this.score = score;
|
||||||
|
this.tiles = new tile[width][height];
|
||||||
|
}
|
||||||
|
}
|
17
src/comp1110/ass2/skeleton/piece.java
Normal file
17
src/comp1110/ass2/skeleton/piece.java
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
package comp1110.ass2.skeleton;
|
||||||
|
|
||||||
|
public class piece {
|
||||||
|
enum pieceType {
|
||||||
|
Settler, Villager
|
||||||
|
}
|
||||||
|
public final pieceType type;
|
||||||
|
public final player owner;
|
||||||
|
public tile placedOn;
|
||||||
|
|
||||||
|
public piece(pieceType type, player owner) {
|
||||||
|
this.type = type;
|
||||||
|
this.owner = owner;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
14
src/comp1110/ass2/skeleton/player.java
Normal file
14
src/comp1110/ass2/skeleton/player.java
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
package comp1110.ass2.skeleton;
|
||||||
|
|
||||||
|
public class player {
|
||||||
|
public final String name;
|
||||||
|
public final int age;
|
||||||
|
public int score;
|
||||||
|
public piece[] pieces;
|
||||||
|
|
||||||
|
public player(String name, int age) {
|
||||||
|
this.name = name;
|
||||||
|
this.age = age;
|
||||||
|
this.score = 0;
|
||||||
|
}
|
||||||
|
}
|
13
src/comp1110/ass2/skeleton/resources.java
Normal file
13
src/comp1110/ass2/skeleton/resources.java
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
package comp1110.ass2.skeleton;
|
||||||
|
|
||||||
|
public class resources {
|
||||||
|
enum resourceType {
|
||||||
|
coconuts, bamboo, water, preciousStones
|
||||||
|
}
|
||||||
|
|
||||||
|
public final resourceType type;
|
||||||
|
|
||||||
|
public resources(resourceType type) {
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
}
|
9
src/comp1110/ass2/skeleton/statuettes.java
Normal file
9
src/comp1110/ass2/skeleton/statuettes.java
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
package comp1110.ass2.skeleton;
|
||||||
|
|
||||||
|
public class statuettes {
|
||||||
|
public final int value;
|
||||||
|
|
||||||
|
public statuettes(int value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
}
|
20
src/comp1110/ass2/skeleton/stoneCircle.java
Normal file
20
src/comp1110/ass2/skeleton/stoneCircle.java
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
package comp1110.ass2.skeleton;
|
||||||
|
|
||||||
|
public class stoneCircle {
|
||||||
|
public final int x;
|
||||||
|
public final int y;
|
||||||
|
public boolean claimed;
|
||||||
|
public player owner;
|
||||||
|
|
||||||
|
public final resources[] resources;
|
||||||
|
public final statuettes[] statuettes;
|
||||||
|
|
||||||
|
public stoneCircle(int x, int y, resources[] resources, statuettes[] statuettes) {
|
||||||
|
this.x = x;
|
||||||
|
this.y = y;
|
||||||
|
this.claimed = false;
|
||||||
|
this.owner = null;
|
||||||
|
this.resources = resources;
|
||||||
|
this.statuettes = statuettes;
|
||||||
|
}
|
||||||
|
}
|
17
src/comp1110/ass2/skeleton/tile.java
Normal file
17
src/comp1110/ass2/skeleton/tile.java
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
package comp1110.ass2.skeleton;
|
||||||
|
|
||||||
|
public class tile {
|
||||||
|
enum tileType {
|
||||||
|
Land, Water
|
||||||
|
}
|
||||||
|
public final tileType type;
|
||||||
|
public int x;
|
||||||
|
public int y;
|
||||||
|
public piece[] pieces;
|
||||||
|
|
||||||
|
public tile(tileType type, int x, int y) {
|
||||||
|
this.type = type;
|
||||||
|
this.x = x;
|
||||||
|
this.y = y;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user