|
| 1 | +@file:Suppress("unused") |
| 2 | + |
| 3 | +package com.peterfarlow.core |
| 4 | + |
| 5 | +enum class TurnAction { |
| 6 | + PLAY_BIRD, |
| 7 | + GAIN_FOOD, |
| 8 | + LAY_EGGS, |
| 9 | + DRAW_CARDS |
| 10 | +} |
| 11 | + |
| 12 | +data class Bird( |
| 13 | + val name: String, |
| 14 | + val latinName: String = "", |
| 15 | + val points: Points = 0, |
| 16 | + val habitat: Set<Habitat>, |
| 17 | + val foodCosts: Set<FoodCost>, |
| 18 | + val nestType: NestType, |
| 19 | + val description: String = "", |
| 20 | + val wingspan: Int, |
| 21 | + val eggs: Int = 0, |
| 22 | + val eggCapacity: Int = 0, |
| 23 | + val powerType: PowerType, |
| 24 | + val powerText: String, |
| 25 | + val tuckedCards: Set<Bird> = emptySet(), |
| 26 | + val cachedFood: Set<Food> = emptySet(), |
| 27 | +) |
| 28 | + |
| 29 | +typealias Points = Int |
| 30 | + |
| 31 | +enum class PowerType { |
| 32 | + BROWN, |
| 33 | + WHITE, |
| 34 | + PINK, |
| 35 | + NONE |
| 36 | +} |
| 37 | + |
| 38 | +enum class Habitat { |
| 39 | + FOREST, |
| 40 | + GRASSLAND, |
| 41 | + WETLAND |
| 42 | +} |
| 43 | + |
| 44 | +enum class NestType { |
| 45 | + PLATFORM, |
| 46 | + BOWL, |
| 47 | + CAVITY, |
| 48 | + GROUND, |
| 49 | + STAR, |
| 50 | + NONE |
| 51 | +} |
| 52 | + |
| 53 | + |
| 54 | +enum class Food { |
| 55 | + WORM, |
| 56 | + WHEAT, |
| 57 | + MOUSE, |
| 58 | + FISH, |
| 59 | + CHERRY, |
| 60 | + WILD |
| 61 | +} |
| 62 | + |
| 63 | +enum class FoodDiceFace { |
| 64 | + WORM, |
| 65 | + WHEAT, |
| 66 | + MOUSE, |
| 67 | + FISH, |
| 68 | + CHERRY, |
| 69 | + WORM_WHEAT |
| 70 | +} |
| 71 | + |
| 72 | +typealias FoodCost = Set<Food> |
| 73 | + |
| 74 | +data class PlayerFoodSupply( |
| 75 | + val worms: Int = 0, |
| 76 | + val wheat: Int = 0, |
| 77 | + val mice: Int = 0, |
| 78 | + val fish: Int = 0, |
| 79 | + val cherries: Int = 0 |
| 80 | +) |
| 81 | + |
| 82 | +data class BirdFeeder( |
| 83 | + val food: Set<FoodDiceFace> = emptySet() |
| 84 | +) |
| 85 | + |
| 86 | +data class PlayerState( |
| 87 | + val birds: PlayedBirds = PlayedBirds(), |
| 88 | + val hand: Set<Bird> = emptySet(), |
| 89 | + val foodTokens: PlayerFoodSupply = PlayerFoodSupply(), |
| 90 | + val bonusCards: Set<BonusCard> = emptySet() |
| 91 | +) |
| 92 | + |
| 93 | +data class PlayedBirds( |
| 94 | + val forestBirds: List<Bird> = emptyList(), |
| 95 | + val grasslandBirds: List<Bird> = emptyList(), |
| 96 | + val wetlandBirds: List<Bird> = emptyList(), |
| 97 | +) |
| 98 | + |
| 99 | +data class PlayBirdAction( |
| 100 | + val bird: Bird, |
| 101 | + val foodCost: FoodCost, |
| 102 | + val eggCost: Int, |
| 103 | + val habitat: Habitat |
| 104 | +) |
| 105 | + |
| 106 | +data class Player( |
| 107 | + val id: Int, |
| 108 | + val name: String, |
| 109 | + val color: Color, |
| 110 | + val state: PlayerState, |
| 111 | +) |
| 112 | + |
| 113 | +enum class Color { |
| 114 | + RED, |
| 115 | + BLUE, |
| 116 | + PURPLE, |
| 117 | + GREEN, |
| 118 | + YELLOW |
| 119 | +} |
| 120 | + |
| 121 | +data class GameState( |
| 122 | + val birdTray: Set<Bird> = emptySet(), |
| 123 | + val birdFeeder: BirdFeeder = BirdFeeder() |
| 124 | +) |
| 125 | + |
| 126 | +interface BonusCard { |
| 127 | + val name: String |
| 128 | + val description: String |
| 129 | + fun apply(playerState: PlayerState): PlayerState |
| 130 | +} |
0 commit comments