Skip to content
Nazareno Aguirre edited this page Sep 12, 2013 · 41 revisions

Welcome to the eiffel-sudoku wiki!

This is a small project to be developed as part of the DOSE course, in its 2013 edition. The project corresponds to the development of a Sudoku application in Eiffel, using Design by Contract.

Table of Contents

Requirements

The requirements document can be found here.

Design

Design concerns can be found here.

Development considerations

Since various developers will be contributing to this project, special care must be taken:

  • Always check which files/directories are being committed/pushed before committing/pushing to the repository.
  • Do not commit/push into the repository if code does not compile.
  • Define a branch at least for your team, to simplify merges.
For development, this simple protocol must be followed during development:
  • If you find an issue, first check whether it has been reported before.
    • If issue does not exist, create a new issue, and try to provide appropriate labels for it.
  • Give priority to unassigned issues. Think twice about taking issues that are already being taken care of.
    • Provide a reasonable justification if you are reassigning an issue to another developer (even yourself).
  • Start working on an issue only after you have reported you are responsible of it.
  • Try to work with a small granularity (e.g., take a routine at a time, not a whole class).
  • When you solved an issue, merge your solution with the master, and push/commit your changes, making sure the project compiles.
  • Report that the issue has been solved, indicating the revision in which you solved it.

Controller

What does it have to do?

  • Receive a number from the GUI then send it to Model
  • Check, thanks to the model, if this value generates conflicts and updates GUI in consequence
  • Check if sudoku is completed
  • Update the GUI when creating a board
  • SUDOKU_CONTROLLER
    • Receive a number from the GUI then sends it to Model
    • Checks if sudoku is completed
    • Update the GUI when creating a board

Gui

What does it have to do?

  • Put a nice sudoku grill on screen
  • Propose various menus such as: New, Exit, Help...
    • New : current sudoku is replace by a shiny new one
    • Exit : a window appear and ask the user if he really want to quit
    • About : a window appear with information about the program version
  • Check if data entered in a cell is valid
    • if valid then send it to controller
    • if not valid reset cell and ask controller to reset a cell
  • Provide the controller with update functions
  • ABOUT_DIALOG
    • Window intended for transient user interaction
  • ABOUT_NEW
    • Window intended for transient user interaction
    • Selection Level
  • ABOUT_QUIT
    • Window intended for transient user interaction
  • APPLICATION
    • Prepare the first window to be displayed
    • Connects the controller with graphical user interface
  • CELL_TEXT_FIELD
    • Text field for a cell of the SUDOKU board
  • INTERFACE_NAMES
    • Strings for the Graphical User Interface
  • MAIN_WINDOW
    • Creates and adds the menu bar

Model

What does it have to do?

  • SUDOKU_BOARD
    • Initialize the board
    • Set it with random value (make a grill the player will have to solve)
  • SUDOKU_CELL
    • Value of the cell. When set, contains a valid value between 1 and 9
    • Sets the cell with new_value
  • SUDOKU_BOARD_TEST_SET
    • ...
    • ...
  • SUDOKU_CELL_TEST_SET
    • ...
    • ...

Import Library

  • When i did a change in make_with_random_values I had to import a library (time), so now the seed of random change.
Please import this library and then you can compile. To do so : right click on libraries just under SUDOKU_CELL in the right-hand menu -> Add Library -> Search for 'time | Complete'
Clone this wiki locally