Skip to content
This repository was archived by the owner on Apr 2, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node CI

on: [push]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm install, and test
run: |
npm ci
npm run build --if-present
npm test -- -u
env:
CI: true
- uses: actions/upload-artifact@master
with:
name: webpack artifacts
path: public/


4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ import Game from './game.js'

let p1, p2
while (!p1) {
p1 = window.prompt('Enter player 1 name:')
p1 = window.prompt('Who is player 1?')
}

while (!p2 && p1 !== p2) {
p2 = window.prompt(p1 === p2
? `Please enter a different name than ${p1}.`
: 'Enter player 2 name:')
: 'Who is player 2?')
}

window.onload = () => {
Expand Down