Skip to content

Commit

Permalink
Re-rename files
Browse files Browse the repository at this point in the history
  • Loading branch information
quasimik committed Jul 10, 2018
1 parent f2d09cf commit f935568
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions game-connect-four.js → game-c4.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict'

const State = require('./state-connect-four.js')
const Play = require('./play-connect-four.js')
const State = require('./state-c4.js')
const Play = require('./play-c4.js')
const N_ROWS = 6
const N_COLS = 7

Expand All @@ -21,7 +21,7 @@ const checkPrototype = [ [0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0] ]

/** Class representing the game. */
class Game_ConnectFour {
class Game_C4 {

/** Generate and return the initial game state. */
start() {
Expand Down Expand Up @@ -102,4 +102,4 @@ class Game_ConnectFour {

}

module.exports = Game_ConnectFour
module.exports = Game_C4
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
'use strict'

const util = require('util')
const Game_ConnectFour = require('./game-connect-four.js')
const Game_C4 = require('./game-c4.js')
const MonteCarlo = require('./monte-carlo.js')

// Setup

let game = new Game_ConnectFour()
let game = new Game_C4()
let mc = new MonteCarlo(game)

let state = game.start()
Expand Down
4 changes: 2 additions & 2 deletions play-connect-four.js → play-c4.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict'

/** Class representing a state transition. */
class Play_ConnectFour {
class Play_C4 {
constructor(row, col) {
this.row = row
this.col = col
Expand All @@ -12,4 +12,4 @@ class Play_ConnectFour {
}
}

module.exports = Play_ConnectFour
module.exports = Play_C4
4 changes: 2 additions & 2 deletions state-connect-four.js → state-c4.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict'

/** Class representing a game state. */
class State_ConnectFour {
class State_C4 {

constructor(playHistory, board, player) {
this.playHistory = playHistory
Expand All @@ -20,4 +20,4 @@ class State_ConnectFour {
// Note: If hash uses board, multiple parents possible
}

module.exports = State_ConnectFour
module.exports = State_C4
6 changes: 3 additions & 3 deletions test-game.js → test-game-c4.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

const N_GAMES = 1000

const Game = require('./game.js')
const State = require('./state.js')
const Play = require('./play.js')
const Game = require('./game-c4.js')
const State = require('./state-c4.js')
const Play = require('./play-c4.js')

let game = new Game()

Expand Down

0 comments on commit f935568

Please sign in to comment.