Giter VIP home page Giter VIP logo

crucegame's Introduction

"Cruce" Game

This is an open source effort to create a free PC Game based on the Romanian card game "Cruce".

The Project's main goal is teaching students how to develop software from start to finish.

"How to build" Game

Tools required

  • You must have GNU C Compiler gcc.
  • You must have autotools on your machine (automake, autoconf and libtool packages). Under Ubuntu they are found in build-essential package.
  • You must have cutter framework installed (cutter-test_framework package) in order to be able to run tests, but this is not required to build the package.

Instructions to build:

  • You need to run ./autogen.sh file (it will generate configure script). $ ./autogen.sh
  • On successful run of ./autogen.sh, you will have configure file. Run it. $ ./configure
  • Next step, is to run make. $ make

Instructions for testing:

  • To run tests you can run either the script provided in tests/run-test.sh: $ ./test/run-test.sh or use make: $ make check

Build options

The method described above will generate a release package (with no debug information or debug options). In the development process and for debugging, it is recommended to use the debug version. It will also use -O0 and -g flags for gcc. To be able to generate it, simply pass --enable-debug="yes" parameter to the configure script:

$ ./configure --enable-debug="yes"

Configure will search for cutter, and if it is available, will build tests too. If you don't want that, use:

$ ./configure --with-cutter="no"

There is also a "hidden" flag, BORDERS. If it is used, a border will be added around curses windows, useful in designing the window layout. To use it, you should specify it explicitly to configure:

$ ./configure CFLAGS=-DBORDERS

Documentation

We use Doxygen for documentation. There is a html version of the documentation for the last release available on branch gh-pages. There is a Doygen configuration file, under docs/Doxyfile. To generate a new version of the documentation, simply run:

$ doxygen path-to-docs/Doxyfile

This will generate 2 directories inside your current directory named html and latex, containing 2 versions of the documentation.

crucegame's People

Contributors

aenachescu avatar balescuovidiu avatar danij avatar flavius avatar mihai-ciupina avatar paul92 avatar raduszasz avatar sarvsav avatar vladuemilian avatar yonutzz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

crucegame's Issues

Windows documentation

SSH is a little bit tough for a beginner. Wouldn't it be better if we'd recommend HTTPS in windows setup tutorial?

Hand winner

Write a function to determine the winner of a hand

Tests to not run under OS X without a make install as root

./run-test.sh

** (cutter:34966): WARNING **: can't load a shared object for test case: ./.libs/test_team.so: dlopen(./.libs/test_team.so, 1): Library not loaded: /usr/local/lib/libdeck.0.dylib
Referenced from: /Volumes/SoftwareDocumentation/Projects/CruceGame/test/.libs/test_team.so
Reason: image not found

** (cutter:34966): WARNING **: can't load a shared object for test case: ./.libs/test_round.so: dlopen(./.libs/test_round.so, 1): Library not loaded: /usr/local/lib/libdeck.0.dylib
Referenced from: /Volumes/SoftwareDocumentation/Projects/CruceGame/test/.libs/test_round.so
Reason: image not found

** (cutter:34966): WARNING **: can't load a shared object for test case: ./.libs/test_deck.so: dlopen(./.libs/test_deck.so, 1): Library not loaded: /usr/local/lib/libdeck.0.dylib
Referenced from: /Volumes/SoftwareDocumentation/Projects/CruceGame/test/.libs/test_deck.so
Reason: image not found

Finished in 0.000056 seconds (total: 0.000000 seconds)

0 test(s), 0 assertion(s), 0 failure(s), 0 error(s), 0 pending(s), 0 omission(s), 0 notification(s)
0% passed

Issue reference at commit

Document how to close an issue and how to reference issues in commit names. The issues should be closed at merge.

Complete the document docs/hacking.md

At the top of the document, there is some text written in italic. This should be integrated into the document to form a cohesive documentation and the italic text should be removed.

Team creation

Add function to create the teams in the Game based on user input, after the players were added to the Game.

Unicode strings

Will unicode string be supported?
If so, which encoding will be used?

compare cards

Write a function for card comparison. Take into account the trump.

Rename libAsciiGui to CruceGameCurses

The name libAsciiGui is no longer relavent because

  • The project is no longer a library, it's a normal executable
  • It uses UTF-8 & curses for displaying the cards

Good Git Techniques and Practices

You should document "good techniques and advices" to reduce merge conflicts and CS violations (like line endings).

Any other git-related advices are also welcome.

Roadmap

Analyze the features and the requirements and create a roadmap for the five milestones: 0.2.0, 0.4.0, 0.6.0, 0.8.0, 1.0.0.

Since you're currently working on 0.2.0, try to create a finer-grained task list (or better yet, a tree of tasks with depencies as children) for this milestone.

Game helper function

Create game_addPlayer(), game_addTeam() - it should take 2 player id's and create a team with them, game_removePlayer(), game_removeTeam().

Card display

Write functions to display cards (a deck, as well as cards from a player's hand or in a game hand). Translate card score to card face.

[Doc] Game Rules (Game Point System) (Both en/ro versions)

In case of game rules, romanian version:

"Sa zicem ca ne continuam jocul in 4 lasat la scorul de 2 - 9 si acelasi jucator al primei echipe castiga licitatia cu doua. La finalul turei, se numara punctele si prima echipa a acumulat 102 puncte, iar cea de-a doua 18. Scorul va fi 5 - 9 (A se observa diferenta fata de whist unde daca nu faci exact cat ai licitat, iei minus, si toti jucatorii au pariurile lor, neexistand un singur pariu pentru fiecare tura)."

I think the final score should be 4-9, instead of 5-9. Because the bid made by first team player was of two. As It's written there that they scored 109 points too, So does it make the increment of 3?

Does the point matters or the bidding matters? In my opinion, it should be bidding, so the final score must be 4-9 instead of 5-9.

Change to autotools

Somewere in documentation it is stated that we are going to use make.
Replace that with autotools.

Rename libCruceGame.h

Using lib in the name of a header is not common. It would be better called cruceGame.h

Compute score function

Add function to team module to compute the score of a team by adding the score of the members.

Implement basic data structures

Implement data structures documented in docs/data-structures.md, as well as some helper functions (like addPlayer to a team). That is just a reference, feel free to add/remove from it.
Comment often, use IRC to let other know what are you doing/what have you done. Work as a team.

Test function names

Currently, test function have the name test_MODULE_test_functionName. Replace them with test_MODULE_functionName

Warning during build process

Getting below warning on build process, that needs attention.

configure.ac:8: warning: AM_INIT_AUTOMAKE: two- and three-arguments forms are deprecated.

test/Makefile.am:1: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')

giveCards

Create functions to add a card to a player and rename round_giveCard to round_putCard

Function Naming Conventions

As C does not allow namespaces, I suggest using modulename_function_name or modulename_functionName as a convention for function names.

build instructions

At commit d85d24b, entering ./autogen.sh says

aclocal: error: 'configure.ac' is required
Failed aclocal

The documentation is completely missing on how to get this rolling.

Multiple libraries

I've noticed from the tests that each .c file is compiled to a different library.
They should all be part of a single game-logic library.

Game structure

Implement a game structure to keep track of all players, current round and teams. It should also contain the deck and a player count.
Create it in a new module, called game.

Correct comments

A lot of comments use very poor English and are hard to understand

Allocate and free structures

Many of the structures need to be dynamically allocated (all, except Card). Please write functions to initialize them (allocate memory and initialize members) and to free them.

constants

Use pointers to constants as function parameters, to avoid changing values by mistake.

Too many asserts

Reduce the number of assertions in test_deck_test_newDeck function from test-deck.c

Features, Requirements, Tools, Libraries

Document (in this order):

  • requirements (from the perspective of the user) - what will the user be able to do with your product (WHAT, not HOW)
  • requirements - what operating systems will it run on? Which compilers and build infrastructure will you use?
  • features - based on the requirements: what you will use to meet those requirements. Which testing framework will you use, will it be multithreaded, which networking techniques will you use (supposing "networking" is among the requirements), which UIs will be available, how will AIs be plugged into the game (supposing AI is a requirement)? "Features" should contain more technical details about how you meet the requirements, but without going into the details of "how"
  • features - will there be a library which I can embed in my own UI? Is it going to be thread-safe?

Is there a mailing list?

  • How will you communicate within the team?
  • How will the client communicate with you?

Where is the mailing list? How to subscribe to it? Document it.

Coding Standard?

Is your code following a coding standard? Is it documented? Is doxygen used or any other tool?

Describe such things in hacking.md

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.