summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore3
-rw-r--r--Field.cpp7
2 files changed, 9 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index b9fc595..03eb65e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
trolltron
#*#
-*~ \ No newline at end of file
+*~
+*.o \ No newline at end of file
diff --git a/Field.cpp b/Field.cpp
index fba00a8..8cb5dea 100644
--- a/Field.cpp
+++ b/Field.cpp
@@ -1,5 +1,12 @@
#include "Field.h"
+class out_of_bounds: public std::exception {
+ virtual const char* what() const throw()
+ {
+ return "index out of bounds";
+ }
+} out_of_bounds;
+
Field::Field(uint width, uint height): m_width(width), m_height(height)
{