项目作者: amyscotteng

项目描述 :
The dice game, pig!
高级语言: JavaScript
项目地址: git://github.com/amyscotteng/pigdicegame.git
创建时间: 2021-01-11T20:01:50Z
项目社区:https://github.com/amyscotteng/pigdicegame

开源协议:

下载


Project Name

Pig

Table of contents

General info

The classic dice game, Pig! If you roll two sixes in a row, your entire score is reset! This was something I created during an online course on Udemy. CSS and HTML was provided by the instructor.

Technologies

  • HTML
  • CSS
  • JavaScript

Code Examples

A small section of the JS in this project:

  1. if (dice1 === 6 || dice2 === 6 && lastDice === 6) {
  2. //Player loses score
  3. scores[activePlayer] = 0;
  4. document.querySelector('#score-' + activePlayer).textContent = '0';
  5. nextPlayer();
  6. }
  7. `

Features

  • A nice, simple interface

To-do list:

  • Redo site so it is mobile friendly. I would eventually like to turn this into an app you can play with friends.

Status

Project is: In progress due to potential improvements

Contact

Amy Scott