Permalink
Browse files

Updated for GitHub.

  • Loading branch information...
blixt committed Nov 8, 2010
1 parent 2619aa1 commit 6c17a79514ea3f581a534816fa00a427ffdc0227
Showing with 47 additions and 10 deletions.
  1. +33 −0 README.md
  2. +2 −2 js/monkey.js
  3. +2 −2 main.py
  4. +1 −1 misc/home.html
  5. +2 −2 monkey.py
  6. +1 −1 templates/home.html
  7. +6 −2 util.py
View
@@ -0,0 +1,33 @@
+# MoNKey!
+
+## Goal
+The goal for this project is to support two-player sessions of m,n,k,p,q-games
+through a web interface developed using Google App Engine as the framework.
+
+## m,n,k,p,q-game?
+From Wikipedia:
+
+> An `m`,`n`,`k`-game is an abstract board game in which two players take turns
+> in placing a stone of their color on an `m`×`n` board, the winner being the
+> player who first gets `k` stones of their own color in a row, horizontally,
+> vertically, or diagonally. Thus, tic-tac-toe is the 3,3,3-game and free-style
+> gomoku is the 19,19,5-game.
+
+The p and q variables were introduced to support Connect6. From Connect6.org:
+
+> Black plays first and puts only `q` black stone on `q` unoccupied
+> intersections (also called grids). Subsequently, Black and White alternately
+> put `p` of their own stones on `p` unoccupied grids.
+
+## License
+
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software distributed
+under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+CONDITIONS OF ANY KIND, either express or implied. See the License for the
+specific language governing permissions and limitations under the License.
View
@@ -1,6 +1,6 @@
/**
- * Copyright (c) 2008 Andreas Blixt <andreas@blixt.org>
- * Project homepage: <http://code.google.com/p/monkey-web/>
+ * Copyright (c) 2008-2010 Andreas Blixt <andreas@blixt.org>
+ * Project homepage: <http://github.com/blixt/monkey>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
View
@@ -1,7 +1,7 @@
# -*- coding: cp1252 -*-
#
-# Copyright (c) 2008 Andreas Blixt <andreas@blixt.org>
-# Project homepage: <http://code.google.com/p/monkey-web/>
+# Copyright (c) 2008-2010 Andreas Blixt <andreas@blixt.org>
+# Project homepage: <http://github.com/blixt/monkey>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
View
@@ -11,7 +11,7 @@
<h1><a href="/">MoNKey!</a></h1>
<div id="body">
<script type="text/javascript">var monkey = new MonkeyClient()</script>
-<p id="source">See full source at <a href="http://code.google.com/p/monkey-web/">http://code.google.com/p/monkey-web/</a></p>
+<p id="source">See full source at <a href="http://github.com/blixt/monkey">http://github.com/blixt/monkey</a></p>
</div>
</body>
</html>
View
@@ -1,7 +1,7 @@
# -*- coding: cp1252 -*-
#
-# Copyright (c) 2008 Andreas Blixt <andreas@blixt.org>
-# Project homepage: <http://code.google.com/p/monkey-web/>
+# Copyright (c) 2008-2010 Andreas Blixt <andreas@blixt.org>
+# Project homepage: <http://github.com/blixt/monkey>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
View
@@ -8,5 +8,5 @@
{% block content %}
<script type="text/javascript">var monkey = new MonkeyClient()</script>
-<p id="source">See full source at <a href="http://code.google.com/p/monkey-web/">http://code.google.com/p/monkey-web/</a>.</p>
+<p id="source">See full source at <a href="http://github.com/blixt/monkey">http://github.com/blixt/monkey</a>.</p>
{% endblock %}
View
@@ -1,13 +1,15 @@
#
-# Copyright (c) 2008 Andreas Blixt <andreas@blixt.org>
-# Project homepage: <http://code.google.com/p/blixt/>
+# Copyright (c) 2008-2010 Andreas Blixt <andreas@blixt.org>
+# Project homepage: <http://github.com/blixt/monkey>
#
# License: MIT license <http://www.opensource.org/licenses/mit-license.php>
#
"""Utility classes and functions for Google App Engine applications.
"""
+import logging
+
from google.appengine.api import users
from google.appengine.ext import webapp
@@ -81,6 +83,8 @@ def get(self, action):
out['status'] = 'success'
out['response'] = attr(**args) if callable(attr) else attr
except Exception, e:
+ logging.exception('An exception occurred when calling %s%r.', action, args)
+
out['status'] = 'error'
out['response'] = { 'message': str(e),
'type': e.__class__.__name__ }

0 comments on commit 6c17a79

Please sign in to comment.