From d2fc9cc7814f53b5a471fc77c28ab13cc75657c5 Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Wed, 15 Mar 2023 11:38:13 +1100 Subject: [PATCH] skeleton: Added initial skeleton files --- src/comp1110/ass2/skeleton/board.java | 12 ++++++++++++ src/comp1110/ass2/skeleton/island.java | 15 +++++++++++++++ src/comp1110/ass2/skeleton/piece.java | 17 +++++++++++++++++ src/comp1110/ass2/skeleton/player.java | 14 ++++++++++++++ src/comp1110/ass2/skeleton/resources.java | 13 +++++++++++++ src/comp1110/ass2/skeleton/statuettes.java | 9 +++++++++ src/comp1110/ass2/skeleton/stoneCircle.java | 20 ++++++++++++++++++++ src/comp1110/ass2/skeleton/tile.java | 17 +++++++++++++++++ 8 files changed, 117 insertions(+) create mode 100644 src/comp1110/ass2/skeleton/board.java create mode 100644 src/comp1110/ass2/skeleton/island.java create mode 100644 src/comp1110/ass2/skeleton/piece.java create mode 100644 src/comp1110/ass2/skeleton/player.java create mode 100644 src/comp1110/ass2/skeleton/resources.java create mode 100644 src/comp1110/ass2/skeleton/statuettes.java create mode 100644 src/comp1110/ass2/skeleton/stoneCircle.java create mode 100644 src/comp1110/ass2/skeleton/tile.java diff --git a/src/comp1110/ass2/skeleton/board.java b/src/comp1110/ass2/skeleton/board.java new file mode 100644 index 0000000..db07ece --- /dev/null +++ b/src/comp1110/ass2/skeleton/board.java @@ -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; + } + +} diff --git a/src/comp1110/ass2/skeleton/island.java b/src/comp1110/ass2/skeleton/island.java new file mode 100644 index 0000000..7095bf3 --- /dev/null +++ b/src/comp1110/ass2/skeleton/island.java @@ -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]; + } +} diff --git a/src/comp1110/ass2/skeleton/piece.java b/src/comp1110/ass2/skeleton/piece.java new file mode 100644 index 0000000..f8aa0ec --- /dev/null +++ b/src/comp1110/ass2/skeleton/piece.java @@ -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; + + } + +} diff --git a/src/comp1110/ass2/skeleton/player.java b/src/comp1110/ass2/skeleton/player.java new file mode 100644 index 0000000..7cf22e4 --- /dev/null +++ b/src/comp1110/ass2/skeleton/player.java @@ -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; + } +} diff --git a/src/comp1110/ass2/skeleton/resources.java b/src/comp1110/ass2/skeleton/resources.java new file mode 100644 index 0000000..0610cc2 --- /dev/null +++ b/src/comp1110/ass2/skeleton/resources.java @@ -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; + } +} diff --git a/src/comp1110/ass2/skeleton/statuettes.java b/src/comp1110/ass2/skeleton/statuettes.java new file mode 100644 index 0000000..2f7d6ad --- /dev/null +++ b/src/comp1110/ass2/skeleton/statuettes.java @@ -0,0 +1,9 @@ +package comp1110.ass2.skeleton; + +public class statuettes { + public final int value; + + public statuettes(int value) { + this.value = value; + } +} diff --git a/src/comp1110/ass2/skeleton/stoneCircle.java b/src/comp1110/ass2/skeleton/stoneCircle.java new file mode 100644 index 0000000..45e389f --- /dev/null +++ b/src/comp1110/ass2/skeleton/stoneCircle.java @@ -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; + } +} diff --git a/src/comp1110/ass2/skeleton/tile.java b/src/comp1110/ass2/skeleton/tile.java new file mode 100644 index 0000000..50aefe6 --- /dev/null +++ b/src/comp1110/ass2/skeleton/tile.java @@ -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; + } +}