Das Model beinhaltet die gesamte Logik. Das Model verwaltet das TicTacToe Spiel, weiß wer gerade an der Reihe ist, wie das Spielfeld aussieht, wer gewinnt und was ein korrekter Spielzug ist.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'time' | |
| class WhatsappMessage | |
| def initialize line | |
| @matches = /(\d{2}.\d{2}.\d{2} \d{2}:\d{2}:\d{2}): (.+?): (.+{1,})/.match(line) | |
| end | |
| def date | |
| Time.strptime(@matches[1], "%d.%m.%y %H:%M:%S") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * ISBN Class | |
| * Represents an ISBN can check its correctness and | |
| * complete an partial ISBN | |
| * @author Tim Kächele | |
| * @copyright Copyright (c) 2014 Tim Kächele | |
| * @license MIT License | |
| */ | |
| import java.util.ArrayList; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Person { | |
| /* | |
| * Es ist in Java Konvetion alle Objektvariablen als "private" zu deklarieren, | |
| * das hat den Vorteil, dass ein Benutzer der Klasse nicht einfach eine | |
| * möglicherweiße fehlerhafte Variable setzt, beispielsweiße -1 für das Alter | |
| * der Person | |
| */ | |
| private Person ehepartner; | |
| private String vorname; | |
| private String nachname; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| typedef char* string; | |
| #define class struct; | |
| // Definition of Datastructures | |
| // stars (*) indicate a reference to another data structure | |
| // Think of it as a `belongs_to` relation. | |
| // | |
| // Every object has an id as well as a updated and created timestamp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "caret_extra_width": 1, | |
| "color_scheme": "Packages/ayu/ayu-mirage.sublime-color-scheme", | |
| "ensure_newline_at_eof_on_save": true, | |
| "font_face": "Cascadia Code", | |
| "font_options": | |
| [ | |
| "dlig", | |
| "no_italic", | |
| "no_bold" |
