Skip to content

alanzhu39/tractorbus-online

Repository files navigation

Tractorbus Online

An online multiplayer client for playing the card game Tractor. Visit http://tractor39.herokuapp.com/ to try it out yourself! Make sure you have three other players with you on the website.

Game Logic

Backend code was written in collaboration with

A version of the game built with Pygame can be found at https://github.com/adamczheng/tractor-client. All game logic was written using Python.

GUI

Frontend code was done with Javascript and basic CSS. The user interface was inspired by Henry Charlesworth's Big 2 client (https://github.com/henrycharlesworth/big2_PPOalgorithm). Flask-SocketIO was used for networking to handle user inputs and synchronize multiplayer gameplay.

Gameplay

Note: Four players must be on the website http://tractor39.herokuapp.com/ to start a game. In this demo, we have four unique players on each tab.

Drawing Cards

Each player takes turns drawing card and then clicking the pass button.


A player can declare the trump suit by selecting the valid Trump Rank (in this case, 2), and clicking play. The bottom right will update the trump suit for the game.

Playing Hands

We can select and play a card by clicking on the sprite. Here, our player wants to play 10 ♠ .
We can also see Player 2's perspective is updated to reflect the board from his point of view.


The red dot moves to the player with the biggest card, which is the person that played the largest card.


If the attacking side (Tabs 2 and 4) win the round, the appropriate amount of points are added to the attacker points.


The game supports different types of plays such as Pairs, Shuais, and Tractors.
Our player can select
Q♥ Q♥ J♥ J♥, which are two consecutive pairs in a row, to play the powerful Tractor.


You can take back your move if the next player has not made their move yet.


You can also clear your selection and play a different hand conveniently with the clear button.

About

online version of tractorbus

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •