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
#include <SFML/Graphics.hpp> | |
#include <vector> | |
int main() | |
{ | |
sf::RenderWindow window({640, 480}, "Hexagons", sf::Style::Default, sf::ContextSettings(0, 0, 8)); | |
// We're simply abusing a `CircleShape` here, | |
// since a circle defined by 6 points IS a hexagon! | |
sf::CircleShape hexagon(25, 6); |
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
// Pins used for this | |
#define LED_PIN 13 | |
#define BUZZER_PIN 11 | |
// The time in milliseconds for short signals | |
#define TIME_UNIT 100 | |
// Frequency used | |
// For classic codes both should match | |
#define FREQUENCY_LONG 220 | |
#define FREQUENCY_SHORT 440 |
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
# Execute with: | |
# godot --no-window -s aoc2021-day1.gd | |
extends SceneTree | |
func read_ints(file: String) -> Array: | |
var ints = [] | |
var f = File.new() | |
f.open(file, File.READ) | |
if f.is_open(): |
OlderNewer