Skip to content

nandor23/doubly-linked-list

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Doubly linked list with extra functionalities

It's based on the C++ STL list data structure, while having some extra functionalities:

  • replacing/removing every element equal to a given element
  • inserting before/after a given position
  • inserting an element N times before/after a position
  • removing an element before/after a given position
  • removing elements between two positions
  • every function has its reversed form (performs like the list was numbered backwards)

War - Game

It's a console-based game without GUI.

The game is implemented with the help of the doubly linked list. The extra functions were not used, the projects main goal was the implementation of the C++ STL list.

game

Gameplay

Wikipedia link

  • The objective of the game is to win all of the cards.
  • The deck is divided evenly among the players, giving each a down stack. Each player reveals the top card of their deck—this is a "battle"—and the player with the higher card takes both of the cards played and moves them to their stack.
  • If the two cards played are of equal value, then there is a "war". Both players place the next three cards face down and then another card face-up. The owner of the higher face-up card wins the war and adds all the cards on the table to the bottom of their deck. If the face-up cards are again equal then the battle repeats with another set of face-down/up cards. This repeats until one player's face-up card is higher than their opponent's

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages