Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Game

Use cowboys to have a good time and play some music on a Piano, while brawling with enemy Cowboys.

Hierarchy

  • BaseGame
    • Game

Implements

  • IBaseGame

Index

Properties

bartenderCooldown

bartenderCooldown: number

How many turns a Bartender will be busy for after throwing a Bottle.

bottles

bottles: Bottle[]

All the beer Bottles currently flying across the saloon in the game.

brawlerDamage

brawlerDamage: number

How much damage is applied to neighboring things bit by the Sharpshooter between turns.

cowboys

cowboys: Cowboy[]

Every Cowboy in the game.

currentPlayer

currentPlayer: Player

The player whose turn it is currently. That player can send commands. Other players cannot.

currentTurn

currentTurn: number

The current turn number, starting at 0 for the first player's turn.

furnishings

furnishings: Furnishing[]

Every furnishing in the game.

gameObjects

gameObjects: object

A mapping of every game object's ID to the actual game object. Primarily used by the server and client to easily refer to the game objects via ID.

Type declaration

jobs

jobs: string[]

All the jobs that Cowboys can be called in with.

mapHeight

mapHeight: number

The number of Tiles in the map along the y (vertical) axis.

mapWidth

mapWidth: number

The number of Tiles in the map along the x (horizontal) axis.

maxCowboysPerJob

maxCowboysPerJob: number

The maximum number of Cowboys a Player can bring into the saloon of each specific job.

maxTurns

maxTurns: number

The maximum number of turns before the game will automatically end.

players

players: Player[]

List of all the players in the game.

rowdinessToSiesta

rowdinessToSiesta: number

When a player's rowdiness reaches or exceeds this number their Cowboys take a collective siesta.

session

session: string

A unique identifier for the game instance that is being played.

sharpshooterDamage

sharpshooterDamage: number

How much damage is applied to things hit by Sharpshooters when they act.

siestaLength

siestaLength: number

How long siestas are for a player's team.

tiles

tiles: Tile[]

All the tiles in the map, stored in Row-major order. Use x + y * mapWidth to access the correct index.

timeAddedPerTurn

timeAddedPerTurn: number

The amount of time (in nano-seconds) added after each player performs a turn.

turnsDrunk

turnsDrunk: number

How many turns a Cowboy will be drunk for if a bottle breaks on it.

Methods

getTileAt

  • getTileAt(x: number, y: number): Tile | undefined
  • Gets the Tile at a specified (x, y) position

    Parameters

    • x: number

      an integer between 0 and the mapWidth

    • y: number

      an integer between 0 and the mapHeight

    Returns Tile | undefined

    the Tile at (x, y) or null if out of bounds

Generated using TypeDoc