28 lines
496 B
C++
28 lines
496 B
C++
|
#ifndef INTCODE_GRID_HPP_
|
||
|
#define INTCODE_GRID_HPP_
|
||
|
|
||
|
#include <ostream>
|
||
|
#include <map>
|
||
|
#include <tuple>
|
||
|
|
||
|
#include <intcode/Machine.hpp>
|
||
|
|
||
|
namespace intcode {
|
||
|
|
||
|
using Coord = std::pair<ValueType, ValueType>;
|
||
|
|
||
|
auto Draw(std::ostream & out, std::map<Coord, ValueType> image) -> void;
|
||
|
|
||
|
auto Up(Coord) -> Coord;
|
||
|
auto Down(Coord) -> Coord;
|
||
|
auto Left(Coord) -> Coord;
|
||
|
auto Right(Coord) -> Coord;
|
||
|
auto CW(Coord) -> Coord;
|
||
|
auto CCW(Coord) -> Coord;
|
||
|
auto Add(Coord, Coord) -> Coord;
|
||
|
|
||
|
|
||
|
} // namespace
|
||
|
|
||
|
#endif
|