Comments (8)
@nelsonic I think that I still have them so I'll have a look and post them here if I do 👍
from chess-elm.
This is what is looks like in master at this point in time...
from chess-elm.
@RobStallion very interesting! 👍
When you next work on this, I look forward to understanding the context of the 10x10 matrix. 🤔
from chess-elm.
@nelsonic Ahhh so feel free to ask me as much as you want about that and anything else for that matter but this particular point was one I really thought about before I started the project and just found interesting in general.
So the reason I decided to go with a 10*10 board was to help with move logic. It seemed like a sensible way to resolve the possible issues that could come up with pieces moving in patterns that they shouldn't.
For example, I didn't want behaviour like this....
Where a bishop could move onto a different diagonal. So the boarder acts as an out of bounds zone. If a piece hits a number in the out of bounds list then it can not move any further.
This could also be achieved with a 9*9 board but then that doesn't account for knight moves.
Take my knight on A3. Knights (as you know) move in an L shape. If this tried to move up one tile and left 2 tiles it would end up on index 40. If the board only didn't have 2 out of bounds tiles in a row the knight would be able to make crazy moves.
Of course this is only a problem for me as I am working out all the piece moves by with simple addition and subtraction, for example, a rook can move in indexes of +/-10 & +/- 1.
I'm sure that there are plenty of other ways that this problem could be approached and solved but this seemed like the most logical to me.
from chess-elm.
@RobStallion thanks for the explanation. I would love to see your paper notes on this! 😉
from chess-elm.
@nelsonic. I just realised I could (and should) have just posted the actual images 😑
Sorry. Obviously wasn't thinking.
Here they are...
from chess-elm.
@nelsonic These are the notes I had for this...
board-notes.zip
from chess-elm.
@RobStallion nice!
from chess-elm.
Related Issues (17)
- Create a function that returns a list of available pawn moves HOT 2
- Display possible moves on the board HOT 5
- Create a way to move pieces HOT 3
- Refactor moves file
- Do you need elm-live? HOT 2
- Grade moves by colour
- Epic: Backend? HOT 1
- Manage who's turn it is
- Spike captures HOT 3
- Create logic that will allow "en passant" captures HOT 4
- When a king is in check do not allow illegal moves HOT 1
- Store current game state in local storage
- Track previous move HOT 4
- club soda testing HOT 7
- Time management HOT 21
- Focus on UI (What People See) HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chess-elm.