Show HN: Play Hearts – Open-source, made with Vue and web sockets(playhearts.cards)
playhearts.cards
Show HN: Play Hearts – Open-source, made with Vue and web sockets
https://www.playhearts.cards/
2 comments
Great question--I hadn't thought of this. I've never added AI to an app, but in school I built games with computer players that use depth-first search algorithms. It was pretty straight-forward to implement, and it was trivial to determine how "hard" you wanted the computer to play (you would just choose how deep for it to search).
Let me know if you're interested in seeing this--could be a fun addition!
Let me know if you're interested in seeing this--could be a fun addition!
Great game! Love playing with my friends
It seems like you'd just need a few basic algorithms. (Pass the king and ace of spades, or your highest hearts, or other high cards. Then just keep track if a heart had been taken...)