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

Create 4 buttons to simulate the keyboard arrows #2

Open
antonioolf opened this issue Oct 1, 2020 · 4 comments
Open

Create 4 buttons to simulate the keyboard arrows #2

antonioolf opened this issue Oct 1, 2020 · 4 comments

Comments

@antonioolf
Copy link
Owner

Currently it is not possible to play through the cell phone, because the game uses the arrow keys to move the pieces.
This problem can be easily overcome by creating 4 buttons with arrow icons to simulate the arrows on the keyboard. It is important that the buttons look good for mobile and are clickable.

@ruhci28
Copy link

ruhci28 commented Oct 1, 2020

Hey can i grab this issue

@antonioolf
Copy link
Owner Author

@ruhci28 Great!

@ruhci28
Copy link

ruhci28 commented Oct 1, 2020

@antonioolf i was changing app.js but it does not seems to reflect the changes. can you tell me which file i have to change

@antonioolf
Copy link
Owner Author

antonioolf commented Oct 1, 2020

@ruhci28 Sorry for not mentioning this before, the project is a little old and some things I didn't remember how I did it. :P
To prepare the project for development, you currently need to manually include all JS files and remove the minified version.

So... in the index.html file replace this line

<script type="text/javascript" src="index.js?v=sHJGwXD"></script>

With this

<script type="text/javascript" src="js/buttons.js"></script>
<script type="text/javascript" src="js/campo.js"></script>
<script type="text/javascript" src="js/extra.js"></script>
<script type="text/javascript" src="js/game.js"></script>
<script type="text/javascript" src="js/info.js"></script>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/peca.js"></script>
<script type="text/javascript" src="js/pecas.js"></script>
<script type="text/javascript" src="js/app.js"></script>

As an improvement I have plans to create an npm script that automates the process of building and running.
If you want, feel free to create a PR out of it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants