Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

solution #1006

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ You can change the HTML/CSS layout if you need it.
## Deploy and Pull Request

1. Replace `<your_account>` with your Github username in the link
- [DEMO LINK](https://<your_account>.github.io/js_2048_game/)
- [DEMO LINK](https://vlad14982.github.io/js_2048_game/)
2. Follow [this instructions](https://mate-academy.github.io/layout_task-guideline/)
- Run `npm run test` command to test your code;
- Run `npm run test:only -- -n` to run fast test ignoring linter;
Expand Down
95 changes: 77 additions & 18 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,38 +21,91 @@ <h1>2048</h1>
Score:
<span class="game-score">0</span>
</p>
<button class="button start">Start</button>
<button
class="button start"
id="startButton"
>
Start
</button>
</div>
</div>

<table class="game-field">
<tbody>
<tr class="field-row">
<td class="field-cell"></td>
<td class="field-cell"></td>
<td class="field-cell"></td>
<td class="field-cell"></td>
<td
class="field-cell"
data-position="0-0"
></td>
<td
class="field-cell"
data-position="0-1"
></td>
<td
class="field-cell"
data-position="0-2"
></td>
<td
class="field-cell"
data-position="0-3"
></td>
</tr>

<tr class="field-row">
<td class="field-cell"></td>
<td class="field-cell"></td>
<td class="field-cell"></td>
<td class="field-cell"></td>
<td
class="field-cell"
data-position="1-0"
></td>
<td
class="field-cell"
data-position="1-1"
></td>
<td
class="field-cell"
data-position="1-2"
></td>
<td
class="field-cell"
data-position="1-3"
></td>
</tr>

<tr class="field-row">
<td class="field-cell"></td>
<td class="field-cell"></td>
<td class="field-cell"></td>
<td class="field-cell"></td>
<td
class="field-cell"
data-position="2-0"
></td>
<td
class="field-cell"
data-position="2-1"
></td>
<td
class="field-cell"
data-position="2-2"
></td>
<td
class="field-cell"
data-position="2-3"
></td>
</tr>

<tr class="field-row">
<td class="field-cell"></td>
<td class="field-cell"></td>
<td class="field-cell"></td>
<td class="field-cell"></td>
<td
class="field-cell"
data-position="3-0"
></td>
<td
class="field-cell"
data-position="3-1"
></td>
<td
class="field-cell"
data-position="3-2"
></td>
<td
class="field-cell"
data-position="3-3"
></td>
</tr>
</tbody>
</table>
Expand All @@ -63,8 +116,14 @@ <h1>2048</h1>
<p class="message message-start">
Press "Start" to begin game. Good luck!
</p>
<p class="message message-playing hidden">
Press "Restart" to start the game again.
</p>
</div>
</div>
<script src="scripts/main.js"></script>
<script
type="module"
src="scripts/main.js"
></script>
</body>
</html>
Loading
Loading