+/* ttt-error.c - errors returned to clients
+ *
+ * Copyright © 2005 Carl Worth
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * Author: Carl Worth <cworth@cworth.org>
+ */
+
+#include "ttt-error.h"
+
+const char *
+ttt_error_string (ttt_error_t error)
+{
+ switch (error) {
+ case TTT_ERROR_NONE:
+ return "ERROT NONE\n";
+ case TTT_ERROR_NONAMESET:
+ return "ERROR NONAMESET\n";
+ case TTT_ERROR_INVALIDNAME:
+ return "ERROR INVALIDNAME\n";
+ case TTT_ERROR_COMMAND:
+ return "ERROR COMMAND\n";
+ case TTT_ERROR_SYNTAX:
+ return "ERROR SYNTAX\n";
+ case TTT_ERROR_NOTNUMBER:
+ return "ERROR NOTNUMBER\n";
+ case TTT_ERROR_NOTGRID:
+ return "ERROR NOTGRID\n";
+ case TTT_ERROR_NOUSER:
+ return "ERROR NOUSER\n";
+ case TTT_ERROR_NOTINGAME:
+ return "ERROR_NOTINGAME\n";
+ case TTT_ERROR_NOTPLAYING:
+ return "ERROR_NOTPLAYING\n";
+ case TTT_ERROR_NOTYOURTURN:
+ return "ERROR NOTYOURTURN\n";
+ }
+
+ ASSERT_NOT_REACHED;
+ return NULL;
+}