6 ms·
Checkers written in Rust and exported to WASM
- keepamovin 2y agoBunch of cool games are here: https://kevinalbs.com/#!games https://kevinalbs.com/#!games :)
- throwaway0665 2y agoI was about to comment saying it was broken and forces you to jump. But it turns out I've just been playing checkers wrong my whole life.
- maxnoe 2y agoAll checkers games I ever played started with a long negotiation about the rules...
- wiktor-k 2y agoExactly. I was surprised that this one doesn't support multi capture when available.
- eptcyka 2y agoDoes it not?
- arijun 2y agoIt does, not sure what you're seeing. Maybe the second jump was in the reverse direction, and thus not legal?
- millerm 2y agoIt does. Don’t forget, only a king can go backwards.
- vlovich123 2y agoBut how many squares can they travel?
- littlestymaar 2y agoOnly one, American checkers' kings are so uncool.
- kolanos 2y agoWas curious about this, so checked: > In American checkers, men can jump only forwards; in international draughts and Russian draughts, men can jump both forwards and backwards. [0] [0]: https://en.wikipedia.org/wiki/Checkers https://en.wikipedia.org/wiki/Checkers
- vlovich123 2y agoMoreover a king in Russian draughts can travel an arbitrary number of squares.
- froh 2y agoa King? in checkers? we call the game "Dame" (as in Dame Judy Dench) and the piece transforms into said Dame with "the usual" super powers. Which are different from the King's. Of course. :-)
- echelon 2y agoIt forces multi capture when available.
- vlovich123 2y agoThere’s a lot of different checkers variants.
- eyelidlessness 2y agoI guess I have too? So has everyone I’ve ever played with.
- deleted 2y ago[deleted]
- kevinAlbs 2y agoI believe I referenced https://wcdf.net/rules.htm https://wcdf.net/rules.htm for rules. I had these questions myself when writing the game. Updated the README to link to the intended rules.
- Blackarea 2y agoYou got the src on github or something? Am learning rust myself and it seems like a neat little sample project
- millerm 2y agoThere’s a link on the page of the game.
- hackyhacky 2y agoSource here: https://github.com/kevinAlbs/checkers https://github.com/kevinAlbs/checkers
- bsaul 2y agoit got locked after 10 moves or something like that (firefox browser). I couldn't move anything no matter where i clicked (and i was far from the end of the game) EDIT : sorry, seems like i probably had to make a forced jump move, which i didn't know was a thing. EDIT 2 : aren't you supposed to be able to capture in reverse direction ?
- amelius 2y agoFor me it locked after 1 move. But then I found out that I was also playing for the opponent.
- keepamovin 2y agoI like how these engineers think they found a bug but were actually just beaten by the correct implementation of the rules of checkers hahaha
- MyOutfitIsVague 2y agoIt's pretty surprising to me the number of people who don't know the rules of checkers here. I guess they were probably taught by a friend or family member who was using house rules.
- bsaul 2y agoin my case it's just that the last game i played was more than 30 years ago..
- keepamovin 2y agoThat is an achievement in itself! Brag and be proud, sir :)
- kaoD 2y ago> aren't you supposed to be able to capture in reverse direction ? Only after promotion.
- bool3max 2y agochecke(rs)
- imtany 2y agoPlease rename to checke.rs :D
- swiftcoder 2y agoI thought this was going to be a type checker :)
- dhosek 2y agoYou’re not alone
- stabbles 2y agoCan't take backwards, looks like a bug.
- MyOutfitIsVague 2y agoIf your piece isn't a king, capturing backwards isn't legal.
- kjrfghslkdjfl 2y ago[dead]
- littlestymaar 2y agoOnly if you aren't using the metric system ;)
- jasonthorsness 2y agoI like the attribute-based approach to wasm bindings in rust, it keeps it clean and to one file, and refreshing how you just have a plain HTML file and just instantiate the module with import init, { Checkers } from "./pkg/checkers.js";
- J_Shelby_J 2y agoI wish the Rust web frameworks were this simple. I mean, they're not insane, but they're just really complex due to all of the use cases they support. Dioxus needs a "lite" mode.
- zeristor 2y agoOh, you mean Draughts, I thought this was some sort of parser
- kevinAlbs 2y agoHello, original author here. I was delightedly surprised to see this game got attention. I believe I referenced https://wcdf.net/rules.htm https://wcdf.net/rules.htm when writing the game. The game has been updated. If a piece is clicked and has no moves, pieces with moves are briefly highlighted.