Skip to content

A board game two people can play online via socket.io

Notifications You must be signed in to change notification settings

lucasturci/Vikings

Repository files navigation

Vikings Game

Overview

Viking chess, or Hnefatafl, is a board game from the nordics, and this project is an online version of this game. The rules can be found here.

It works on mobile too.

The front-end was implemented with React + Webpack, and the backend with Node + Express. The multiplayer interaction was implemented with the socket.io package.

All art was created by me.

Sometimes the socket connection is closed after inactivity, especially on mobile. The fix is a to-do.

Improvements

  • Add sfx
  • Add tests
  • Add draw command

Commands

When playing with your friend, you can type some commands in the chat:

  • Give Up:

Type \gg to give up. Your opponent automatically wins.

  • Swap Colors:

Type \swap to swap colors. If you are playing as the defender, you become the attacker, and vice-versa. After each rematch you and your opponent swap by default.

  • Undo a Move:

Type \undo to undo your move. You can also type this to undo your opponents move. You can keep undoing until you go back to the initial position.

  • Draw:

This is a to-do. You are welcome to contribute with a pull request. :) Both players must type \draw in the chat to agree to a draw.

About

A board game two people can play online via socket.io

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published