1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 22:37:35 +00:00

GameOfLife: Add choosable patterns

This commit is contained in:
Ryan Wilson 2021-05-22 05:54:58 -03:00 committed by GitHub
parent b808815e57
commit 1965d60aeb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 309 additions and 7 deletions

View file

@ -0,0 +1,26 @@
/*
* Copyright (c) 2021, Ryan Wilson <ryan@rdwilson.xyz>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include "Board.h"
#include <AK/Vector.h>
#include <LibGUI/Event.h>
#include <LibGUI/Forward.h>
class Pattern {
public:
Pattern(Vector<String>);
virtual ~Pattern();
Vector<String> pattern() { return m_pattern; };
GUI::Action* action() { return m_action; }
void set_action(GUI::Action*);
void rotate_clockwise();
private:
RefPtr<GUI::Action> m_action;
Vector<String> m_pattern;
};