diff --git a/boards (MacBook Pro's conflicted copy 2017-11-14).db b/boards (MacBook Pro's conflicted copy 2017-11-14).db new file mode 100644 index 0000000..e668a0a Binary files /dev/null and b/boards (MacBook Pro's conflicted copy 2017-11-14).db differ diff --git a/boards (Zev’s MacBook Pro's conflicted copy 2017-12-16).db b/boards (Zev’s MacBook Pro's conflicted copy 2017-12-16).db new file mode 100644 index 0000000..99d0856 Binary files /dev/null and b/boards (Zev’s MacBook Pro's conflicted copy 2017-12-16).db differ diff --git a/boards.db b/boards.db index d3e0f31..9e5a913 100644 Binary files a/boards.db and b/boards.db differ diff --git a/config.py b/config.py index a57afc5..970da26 100644 --- a/config.py +++ b/config.py @@ -5,21 +5,24 @@ config = dict(num_squares=312) colors = [ 'red', - 'blue', + '#0000FF', + '#CF5300', + '#0000CC', 'yellow', 'green', '#2C2416', 'black', + '#1A1B29', + '#333333', '#F98D8D', 'orange', - '#1A1B29', '#000080', - '#333333', - '#CF5300', '#8B0000', '#FFCE00', '#006400', '#CA278C', + '#3B0160', + '#9370DB', ] diff --git a/models.py b/models.py index 9e86feb..70dd1c9 100644 --- a/models.py +++ b/models.py @@ -83,6 +83,12 @@ def prep_colors_for_table(some_colors): return palette +def update_base_table(): + base_board = get_board() + base_board.palette = ''.join(colors) + session.commit() + + base_board = get_board(name='') or create_board('', '00' * num_squares, colors) # each number is represented by a two-digit integer string diff --git a/routes.py b/routes.py index 0be5eef..7b1de7a 100644 --- a/routes.py +++ b/routes.py @@ -5,13 +5,29 @@ from flask import Flask, render_template, request, jsonify, redirect, url_for from config import config from models import session, get_color_num_dict, base_board, colors, color_num_dict, get_board, get_boards, \ - create_board + create_board, update_base_table app = Flask(__name__) num_squares = config['num_squares'] +# TODO: export an animtated gif of the progress of a piece +# TODO: fix loading/saving +# TODO: add undo/redo +# TODO: add Eno-like soothing tones when you tap a box +# TODO: make selected color slightly larger +# TODO: dislpay filename +# TODO: allow renaming +# TODO: allow live view of progress via web/app + +# not related to the app +# TODO: make simon.averba.ch and put his art up there because he wants to "send it to everybody in the world" +# TODO: make sylvia.averba.ch and put his art up there because he wants to "send it to everybody in the world" +# TODO: make abi.averba.ch and put his art up there because he wants to "send it to everybody in the world" +# TODO: use IFPS for the above + + @app.route('/') def main_board(board_name=None): @@ -21,6 +37,7 @@ def main_board(board_name=None): @app.route('/') def main(): + update_base_table() return render_template('100_blocks.html', all_boards=get_boards(), board=base_board)