I saw a couple posts about the Snake game recently, and I realized that I've never actually tried to tackle this game. This post is only about design, so if that idea doesn't interest you, feel free to skip this entry.

Alright, so Snake is played on a grid of W,H where W = some width and H = some height. A snake segment is a 1x1 cell at...

Alright, so Snake is played on a grid of W,H where W = some width and H = some height. A snake segment is a 1x1 cell at...

Been seeing a few posts on here about building a deck of cards, so I figured I'd work it out in C++.

...

So, I was thinking about OOP and inheritance, and I got to thinking about a new construct in OOP where you specify dominant and recessive properties/methods like with real inheritance.

Consider two objects Mother, Father in a fictional language:

Consider two objects Mother, Father in a fictional language:

...

Maybe the reputation points might not mean a lot to most people here, but I don't generally post in areas outside of assisting people with problems, so this means that my points are a fairly good indicator for how many people I've actually helped, and it feels pretty good.

I think back to the first people that I helped with C# problems...

I think back to the first people that I helped with C# problems...

Part 1

Part 2

Recall:

Here is the bare-bones parser:

Part 2

Recall:

poly -> term | term + poly | term - polyterm -> coef | coef x | coef x ^ DIGIT DIGIT*coef -> INT | REALINT -> - DIGIT DIGIT* | DIGIT DIGIT*REAL -> - DIGIT DIGIT* . DIGIT DIGIT* | DIGIT DIGIT* . DIGIT DIGIT*DIGIT-> 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9

Here is the bare-bones parser:

...

Recall last post: [link]

Let's think about tokens.

poly -> term | term + poly | term - polyterm -> coef | coef x | coef x ^ DIGIT DIGIT*coef -> INT | REALINT -> - DIGIT DIGIT* | DIGIT DIGIT*REAL -> - DIGIT DIGIT* . DIGIT DIGIT* | DIGIT DIGIT* . DIGIT DIGIT*DIGIT-> 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9

Let's think about tokens.

...

I read a pretty cool project idea the other day where you're to read in some polynomial and do operations on it. I figured that this is a pretty nice project to apply my newly acquired knowledge of grammars on. It might be overkill, but it'll be fun none the less.

A polynomial of degree n of one variable is a function of the form: f(x) =...

A polynomial of degree n of one variable is a function of the form: f(x) =...

What you do with this information is up to you. I personally see no use for most of it.

Anyway, I'm working through Introduction to the Theory of Computation (3rd) by Michael Sipser.

Anyway, I'm working through Introduction to the Theory of Computation (3rd) by Michael Sipser.

**Automata and Languages****Context-Free Languages****Church-Turing Thesis****Decidability****Undecidability****Relationships****...**
Sometimes you have a project to complete that has a clear implementation strategy, and requires very little design, but most of the time you have multiple related features of varying difficulty.

In such cases, an approach I've found that works fairly well is to design from both ends at the same time. You pick what you think to be the easiest...

In such cases, an approach I've found that works fairly well is to design from both ends at the same time. You pick what you think to be the easiest...

### ← October 2021 →

S | M | T | W | T | F | S |
---|---|---|---|---|---|---|

1 | 2 | |||||

3 | 4 | 5 | 6 | 7 | 8 | 9 |

10 | 11 | 12 | 13 | 14 | 15 | 16 |

17 | 18 |
19
| 20 | 21 | 22 | 23 |

24 | 25 | 26 | 27 | 28 | 29 | 30 |

31 |

### Tags

### My Blog Links

### Recent Entries

### Recent Comments

### Search My Blog

### 3 user(s) viewing

**3**Guests

**0**member(s)

**0**anonymous member(s)