mirror of
https://github.com/jeremysrand/a2sudoku.git
synced 2024-05-31 19:41:35 +00:00
40 lines
854 B
C
40 lines
854 B
C
//
|
|
// game.h
|
|
// a2sudoku
|
|
//
|
|
// Created by Jeremy Rand on 2015-07-15.
|
|
// Copyright (c) 2015 Jeremy Rand. All rights reserved.
|
|
//
|
|
|
|
|
|
#include "puzzles.h"
|
|
|
|
#ifndef __a2sudoku__game__
|
|
#define __a2sudoku__game__
|
|
|
|
|
|
// Typedefs
|
|
|
|
typedef uint16_t tScratchValues;
|
|
typedef void (*tUpdatePosCallback)(tPos x, tPos y, tSquareVal val, tScratchValues scratch, bool correct, bool invalid);
|
|
|
|
|
|
// API
|
|
|
|
extern void startGame(tUpdatePosCallback callback);
|
|
|
|
extern void refreshAllPos(void);
|
|
|
|
extern void refreshPos(tPos x, tPos y);
|
|
|
|
extern bool isPuzzleSolved(void);
|
|
|
|
// Returns false if unable to set the value for some reason
|
|
extern bool setValueAtPos(tPos x, tPos y, tSquareVal val);
|
|
|
|
// Returns false if unable to toggle the scratch value for some reason
|
|
extern bool toggleScratchValueAtPos(tPos x, tPos y, tSquareVal val);
|
|
|
|
|
|
#endif /* defined(__a2sudoku__game__) */
|