Giter VIP home page Giter VIP logo

chessx's Introduction

If you start working with code, please read though the following rules:


1. Use Qt naming scheme. You may have a look at Qt API to learn it.
Here are some examples:

* classes: BoardView, Filter
* classes with acronyms: PgnDatabase
* class variables: m_list, m_darkSquareColor
* reading class variable: QString title() const
* setting class variable: void setTitle(const QString& s) const
* checks: isReadOnly()
* functions with acronyms: moveToSan(), fromSan()

2. Use Doxygen format to comment your code

* start class documentation with Doxygen header
  /** @ingroup Database
    The Board class represents a chess position.
    Pieces are kept directly on the board which is internally represented as simple array[0..63].
    You can easily and quickly make and undo moves, although undoing moves requires keeping track
    of captured pieces.
  */
  @ingroup should contain Database (for non-GUI classes) or GUI
  Next sentence should have 'The XXX class represents' or '... is' syntax
  
* document each function 
  /** Sets widget color. */ 
  void setColor(const QColor& color);
  /** @return widget color. */ 
  QColor color() const;
  
* rebuild documentation with 'doxygen Doxyfile' and verify that your class is documented correctly.

3. Format your code with TABs. We advocate using astyle
(http://astyle.sourceforge.net) to indent your code. To use astyle, put

suffix=none style=linux mode=c force-indent=tab=4 one-line=keep-blocks unpad=paren pad=oper

in ~/.astylerc. Then you can indent your code using:
astyle <file1> <file2> ...

chessx's People

Contributors

madnight avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar  avatar

Forkers

wooodhead

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.