1.4.66 • Published 6 years ago

cc2018-ts-lib v1.4.66

Weekly downloads
4
License
ISC
Repository
github
Last release
6 years ago

cc2018-shared-library

TypeScript Class / Module library for Code Camp 2018.

Samples

  • For JavaScript examples, see: /js-example.js
  • For TypeScript examples, see: /src/ts-example.ts

Maze.ts

Maze Class - The basic maze class with generation and text-rendering functions.

Cell.ts

Cell Class - The maze itself is a two dimensional array of Cells

Enums.ts

Enums Module - Enumerations and helpful functions related to them

Game.ts

Game Class - Manages ongoing game sessions

Score.ts

Score Class - Tracks scores and action/result history

Team.ts

Team Class - Basic team info and a collection of the team's individual AI

Logger.ts

Logger Module - Simple console logging wrapper to provide consistent, controllable console logging

Usage:

import { Bot, Cell, Enums, Game, Logger, Maze, Score, Team, ICell, IMaze, IMazeStub, IScore, ITeam } from 'cc2018-ts-lib'; // import classes
import { LOG_LEVELS } from 'cc2018-ts-lib/dist/Logger';

// Using the logger
let log = Logger.getInstance();
logger.setLogLevel(LOG_LEVELS.DEBUG);
log.info(__filename, 'Example()', 'This is an example of how to use cc2018-ts-lib.');

// Using the maze class
let myMaze = new Maze();
myMaze.generate(10, 15, 'SuperSimple');
console.log(myMaze.render());

// getting a specific cell
let myCell = myMaze.cells[0][0];
let exits = myCell.getExits();

// using Enums and Enum helper functions 
console.log(Enums.listSelectedBitNames(Enums.DIRS, exits));
1.4.66

6 years ago

1.4.65

6 years ago

1.4.60

6 years ago

1.4.51

6 years ago

1.4.5

6 years ago

1.4.46

6 years ago

1.4.45

6 years ago

1.4.42

6 years ago

1.4.41

6 years ago

1.4.40

6 years ago

1.4.39

6 years ago

1.4.38

6 years ago

1.4.35

6 years ago

1.4.31

6 years ago

1.4.3

6 years ago

1.4.24

6 years ago

1.4.23

6 years ago

1.4.22

6 years ago

1.4.21

6 years ago

1.4.2

6 years ago

1.4.1

6 years ago

1.4.0

6 years ago

1.3.3

6 years ago

1.3.2

6 years ago

1.3.1

6 years ago

1.3.0

6 years ago

1.2.0

6 years ago

1.1.5

6 years ago

1.1.4

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.0

6 years ago

0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago