-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
executable file
·42 lines (31 loc) · 1021 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/usr/bin/env python
# -*-coding:utf8-*-
from kivy.app import App
from kivy.lang import Builder
from kivy.config import Config
from kivy.uix.screenmanager import ScreenManager
from kivy.core.text import LabelBase
from model import Board, Problem
from view import SudokuScreen
from view.widget import *
Config.set('graphics', 'width', '320')
Config.set('graphics', 'height', '480')
Builder.load_file('kv/sudoku.kv')
LabelBase.register(
'SeoulNamsan',
fn_regular='static/font/SeoulNamsanM.ttf',
fn_bold='static/font/SeoulNamsanB.ttf')
problem = Problem.loads(
"800523910162489075350170420425008009690000"
"057700600234037062041540317692016954003",
"87452391616248937535917642842573816969324185"
"7781695234937862541548317692216954783",
9)
board = Board(problem)
sm = ScreenManager()
sm.switch_to(SudokuScreen(board_model=board))
class SudokuApp(App):
def build(self):
return sm
if __name__ == '__main__':
SudokuApp().run()