diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..a5d5036 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,14 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "node", + "request": "launch", + "name": "Launch Program", + "program": "${workspaceFolder}/js/main.js" + } + ] +} \ No newline at end of file diff --git a/README.md b/README.md index 682c6c6..7c6126d 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ #### Minimum Deliverable Product a working game of go for a 9x9 board that -* displays well on mobile +* displays well on mobile or desktop * initiates a game with suggested handicap and komi according to rank input * * displays how to play in open screen * lets the user know whose turn it is @@ -11,7 +11,6 @@ a working game of go for a 9x9 board that * * implement a search algorithm to avoid moving into dead space * correctly removes captured stones and adds them to capturing player's score * logs game record -* maintains a one move game state history for 'undo mismove' * allows players to pass or resign * * ends game upon 2 consecutive passes * calculates estimated score at game end @@ -21,6 +20,7 @@ a working game of go for a 9x9 board that stretch goals * uses stone placement GUI for resign and pass +* maintains a one move game state history for 'undo mismove' * converts string to .sgf format * allows users to edit game info mid game * add stone placement sounds diff --git a/css/main.css b/css/main.css index 7826762..1959bdc 100644 --- a/css/main.css +++ b/css/main.css @@ -1,5 +1,6 @@ * { box-sizing: border-box; + margin: 0; } .full-screen { @@ -12,4 +13,106 @@ "record record record options" <- displays numbered record (stretch!), new game, get game record(stretch!) pre-game record will display instructions */ +} + +content { + background-color: #61a6c2; + display: grid; + grid-template-columns: 100vmin; + grid-template-rows: 1fr 100vmin 1fr; + grid-template-areas: + "white-pos" + "board-space" + "black-pos" +} + +.player-pos { + display: flex; + align-content: center; + align-items: center; + justify-content: space-between; +} + +.player-pos#white-pos { + grid-area: white-pos; +} + +.player-pos#black-pos { + grid-area: black-pos; + flex-direction: row-reverse; +} + +#kifu { + order: 0; +} + +.bowl { + order: -1; + margin: 20px; + height: 8vh; + width: 8vh; + border: solid black; + border-radius: 50%; +} + +.caps { + order: 1; +} + +#board-space { + margin: 0 auto; + grid-area: board-space; + display: flex; + flex-direction: column; + background-color: #EAB24E; + width: 90vmin; + height: 90vmin; + padding: 1vmin; +} + +table { + display: flex; + align-items: stretch; + justify-content: space-between; + height: 81vmin; + width: 81min; + margin: auto; +} + +td { + height: 9vmin; + width: 9vmin; + background: conic-gradient(#000 0%, rgba(0,0,0,0) 1%, rgba(0,0,0,0) 24%, #000 25%, rgba(0,0,0,0) 26%, rgba(0,0,0,0) 49%, #000 50%, rgba(0,0,0,0) 51%, rgba(0,0,0,0) 74%, #000 75%, rgba(0,0,0,0) 76%, rgba(0,0,0,0) 99%, #000 100%); + border-radius: 50% solid black; + color: black; +} + +td[id^="0,"] { + background: conic-gradient( rgba(0,0,0,0) 24%, #000 25%, rgba(0,0,0,0) 26%, rgba(0,0,0,0) 49%, #000 50%, rgba(0,0,0,0) 51%, rgba(0,0,0,0) 74%, #000 75%, rgba(0,0,0,0) 76%); +} + +#row-8 td { + background: conic-gradient(#000 0%, rgba(0,0,0,0) 1%, rgba(0,0,0,0) 24%, #000 25%, rgba(0,0,0,0) 26%, rgba(0,0,0,0) 74%, #000 75%, rgba(0,0,0,0) 76%, rgba(0,0,0,0) 99%, #000 100%); +} + +td[id$="0"] { + background: conic-gradient(#000 0%, rgba(0,0,0,0) 1%, rgba(0,0,0,0) 24%, #000 25%, rgba(0,0,0,0) 26%, rgba(0,0,0,0) 49%, #000 50%, rgba(0,0,0,0) 51%, rgba(0,0,0,0) 99%, #000 100%); +} + +td[id$="8"] { + background: conic-gradient(#000 0%, rgba(0,0,0,0) 1%, rgba(0,0,0,0) 49%, #000 50%, rgba(0,0,0,0) 51%, rgba(0,0,0,0) 74%, #000 75%, rgba(0,0,0,0) 76%, rgba(0,0,0,0) 99%, #000 100%); +} + +td[id="0,0"] { + background: conic-gradient(#000 0%, rgba(0,0,0,0) 1%, rgba(0,0,0,0) 24%, #000 25%, rgba(0,0,0,0) 26%, rgba(0,0,0,0) 49%, #000 50%, rgba(0,0,0,0) 51%); +} + +td#0,8 { + background: conic-gradient(#000 0%, rgba(0,0,0,0) 1%, rgba(0,0,0,0) 24%, #000 25%, rgba(0,0,0,0) 26%, rgba(0,0,0,0) 49%, #000 50%, rgba(0,0,0,0) 51%, rgba(0,0,0,0) 74%, #000 75%, rgba(0,0,0,0) 76%, rgba(0,0,0,0) 99%, #000 100%); +} +td#8,0 { + background: conic-gradient(#000 0%, rgba(0,0,0,0) 1%, rgba(0,0,0,0) 24%, #000 25%, rgba(0,0,0,0) 26%, rgba(0,0,0,0) 49%, #000 50%, rgba(0,0,0,0) 51%, rgba(0,0,0,0) 74%, #000 75%, rgba(0,0,0,0) 76%, rgba(0,0,0,0) 99%, #000 100%); +} +td#8,8 { + background: conic-gradient(#000 0%, rgba(0,0,0,0) 1%, rgba(0,0,0,0) 24%, #000 25%, rgba(0,0,0,0) 26%, rgba(0,0,0,0) 49%, #000 50%, rgba(0,0,0,0) 51%, rgba(0,0,0,0) 74%, #000 75%, rgba(0,0,0,0) 76%, rgba(0,0,0,0) 99%, #000 100%); } \ No newline at end of file diff --git a/index.html b/index.html index 36f7570..3c7dba3 100644 --- a/index.html +++ b/index.html @@ -5,26 +5,127 @@ - - - Go Cats + + Browser Go -