+
+Bullet::Bullet(string const & t)
+ : font(MIN), character(MIN), size(MIN), user_text(1), text(t)
+{
+#ifdef ENABLE_ASSERTIONS
+ testInvariant();
+#endif
+}
+
+
+void Bullet::setCharacter(int c)
+{
+ if (c < MIN || c >= CHARMAX) {
+ character = MIN;
+ } else {
+ character = c;
+ }
+ user_text = 0;
+#ifdef ENABLE_ASSERTIONS
+ testInvariant();
+#endif
+}
+
+
+void Bullet::setFont(int f)
+{
+ if (f < MIN || f >= FONTMAX) {
+ font = MIN;
+ } else {
+ font = f;
+ }
+ user_text = 0;
+#ifdef ENABLE_ASSERTIONS
+ testInvariant();
+#endif
+}
+
+
+void Bullet::setSize(int s)
+{
+ if (s < MIN || s >= SIZEMAX) {
+ size = MIN;
+ } else {
+ size = s;
+ }
+ user_text = 0;
+#ifdef ENABLE_ASSERTIONS
+ testInvariant();
+#endif
+}
+
+
+void Bullet::setText(string const & t)
+{
+ font = character = size = MIN;
+ user_text = 1;
+ text = t;
+#ifdef ENABLE_ASSERTIONS
+ testInvariant();
+#endif
+}
+
+
+int Bullet::getCharacter() const
+{
+ return character;
+}
+
+
+int Bullet::getFont() const
+{
+ return font;
+}
+
+
+int Bullet::getSize() const
+{
+ return size;
+}
+
+
+Bullet & Bullet::operator=(Bullet const & b)
+{
+#ifdef ENABLE_ASSERTIONS
+ b.testInvariant();
+#endif
+ font = b.font;
+ character = b.character;
+ size = b.size;
+ user_text = b.user_text;
+ text = b.text;
+#ifdef ENABLE_ASSERTIONS
+ this->testInvariant();
+#endif
+ return *this;
+}
+
+