- HTML
- JavaScript
- CSS
- Bootstrap
This is a game to play pig-dice with a friend.
- Access project through github repository (github.com/ChrisKLoveless)
- Clone repository
- Open index.html file in browser
- When 1 is rolled next player message does not display.
Describe: Player();
Test: "It should create a player object with a name and score properties"
Code: function Player(name, score){
this.name = name;
this.score = score;
}
Expected Output: let test = new Player("test", 0)
test;
Player {name: "test", score: 0}
Describe: Player.prototype.hold = function ();
Test: "It should keep the players score for their turn and reset to previous turn"
Code: Player.prototype.hold = function () {
}
Expected Output:
Describe: Player.prototype.diceRoll = function();
Test: "It will generate a random number with a fixed max"
Code: Player.prototype.diceRoll = function() {
let roll = Math.floor(Math.random() * (6) + 1)
this.score += roll;
}
Expected Output: test.diceRoll()
test{name: 'test', score 5}
Copyright (c) 2022 Chris Loveless, Ryan Krueger, Anahi Ruiz Robles MIT