Stefan Harmuth
|
0b8a477184
|
implement Chebyshev/Chessboard distance algorithm
|
2021-12-13 07:39:08 +01:00 |
|
Stefan Harmuth
|
3c855e6749
|
range methods
better get()
allow print() to be useful with false/true grids
|
2021-12-13 07:19:27 +01:00 |
|
Stefan Harmuth
|
d5a278ceef
|
a* (untested)
|
2021-12-13 06:18:25 +01:00 |
|
Stefan Harmuth
|
dfe5afb735
|
write json files readable
|
2021-12-13 05:08:35 +01:00 |
|
Stefan Harmuth
|
78e180871e
|
accomodate for pypy
|
2021-12-12 17:58:03 +01:00 |
|
Stefan Harmuth
|
904caf85ae
|
fibonacci without functools (to work in pypy)
|
2021-12-12 15:28:33 +01:00 |
|
Stefan Harmuth
|
d8bb8d8aba
|
setup.py needs to be top level
|
2021-12-12 15:15:28 +01:00 |
|
Stefan Harmuth
|
ec059d5354
|
way better (and much quicker) solution to receive lines from sockets
|
2021-12-12 08:25:47 +01:00 |
|
Stefan Harmuth
|
d806c838c4
|
remove unnecessary int cast
|
2021-12-11 08:56:37 +01:00 |
|
Stefan Harmuth
|
4c56a767b2
|
more robust interface, keep track of users and channels
|
2021-12-11 08:53:44 +01:00 |
|
Stefan Harmuth
|
4ab6519321
|
annotation cleanup
add grid.mul() and grid.div()
|
2021-12-11 07:15:32 +01:00 |
|
Stefan Harmuth
|
7b52ce4fba
|
codeline cleanup
|
2021-12-11 06:47:33 +01:00 |
|
Stefan Harmuth
|
abbf1c85e1
|
grid.Grid: finally add that stupid print() method I'm always writing for debugging
grid.Grid: add(), sub() and set() return what they've actually wrote to the cell
|
2021-12-11 06:45:24 +01:00 |
|
Stefan Harmuth
|
55a12f7dc8
|
don't assume what an "OFF_STATE" might be, use the supplied default instead
|
2021-12-09 06:20:57 +01:00 |
|
Stefan Harmuth
|
393e846926
|
import woes
|
2021-12-07 08:50:02 +01:00 |
|
Stefan Harmuth
|
eb63ba9e99
|
annotations, correct plural
|
2021-12-07 06:54:31 +01:00 |
|
Stefan Harmuth
|
c5d10980e9
|
relative import
|
2021-12-07 06:49:23 +01:00 |
|
Stefan Harmuth
|
4a2b99f8f2
|
some more integer sequences to remember
|
2021-12-07 06:38:42 +01:00 |
|
Stefan Harmuth
|
5c811280d7
|
move everything into a submodule to avoid namespace collisions
|
2021-12-07 06:30:52 +01:00 |
|
Stefan Harmuth
|
63dc8da100
|
those are not only replys
|
2021-12-06 09:17:45 +01:00 |
|
Stefan Harmuth
|
f5d6f2deb0
|
catch empty lines and thelike
|
2021-12-06 08:35:05 +01:00 |
|
Stefan Harmuth
|
57ba56bf2b
|
convert timedelta to readable string
|
2021-12-06 05:56:26 +01:00 |
|
Stefan Harmuth
|
d757a82d80
|
using dicts is hard ...
|
2021-12-05 16:15:40 +01:00 |
|
Stefan Harmuth
|
8c9206effe
|
filehandling woes
|
2021-12-05 16:06:25 +01:00 |
|
Stefan Harmuth
|
3933cdbadf
|
properly keep track of own nickname
|
2021-12-05 15:27:31 +01:00 |
|
Stefan Harmuth
|
779d77dad7
|
a (very) simple irc client ...
|
2021-12-05 13:20:05 +01:00 |
|
Stefan Harmuth
|
f1c731bb7c
|
shot at simplifying sockets .. somewhat
|
2021-12-05 11:14:23 +01:00 |
|
Stefan Harmuth
|
adff0f724f
|
simple helper to load (json) files into dicts
|
2021-12-05 10:34:41 +01:00 |
|
Stefan Harmuth
|
cce6e058c2
|
the famous daemon class from Joseph Ernest
|
2021-12-05 10:19:36 +01:00 |
|
Stefan Harmuth
|
955f4ad88c
|
simple scheduler to be called from daemon processes or similar
|
2021-12-05 10:14:00 +01:00 |
|
Stefan Harmuth
|
f8db937643
|
simple scheduler to be called from daemon processes or similar
|
2021-12-05 10:08:38 +01:00 |
|
Stefan Harmuth
|
37166532ae
|
grid.Grid: introduce rudimentary 3d support
|
2021-12-05 08:21:26 +01:00 |
|
Stefan Harmuth
|
75c7df6f19
|
useless list comprehension is useless
|
2021-12-05 07:53:17 +01:00 |
|
Stefan Harmuth
|
266bc44752
|
pythagoras is hard (not it isn't)
|
2021-12-05 07:44:02 +01:00 |
|
Stefan Harmuth
|
766a16c314
|
remove unused import
|
2021-12-05 07:38:46 +01:00 |
|
Stefan Harmuth
|
311cb9edba
|
Coordinate: remember the 3rd dimension ...
|
2021-12-05 07:36:38 +01:00 |
|
Stefan Harmuth
|
2b19538fb2
|
Coordinate.getLineTo(): return coordinates in a line from self to target
|
2021-12-05 07:16:40 +01:00 |
|
Stefan Harmuth
|
122f1e768e
|
grid.Grid(): let set() not track default values not present in OFF_STATES
|
2021-12-05 06:46:43 +01:00 |
|
Stefan Harmuth
|
e2d36cbde6
|
grid.Grid: let add() and sub() use self.set() instead of reimplementing part of it. Also makes sure default values aren't part of the dict anymore.
|
2021-12-05 06:45:35 +01:00 |
|
Stefan Harmuth
|
8f024354e6
|
Merge remote-tracking branch 'origin/master'
|
2021-12-05 05:58:58 +01:00 |
|
Stefan Harmuth
|
f6e9cfb4af
|
AOCDay.getMultilineInputArray(): work with an input-copy ...
|
2021-12-05 05:58:53 +01:00 |
|
Stefan Harmuth
|
6c14f6bb50
|
Merge remote-tracking branch 'origin/master'
|
2021-12-03 17:01:24 +01:00 |
|
Stefan Harmuth
|
da791d3ec5
|
Grid.set() sets pos to True by default
|
2021-12-03 17:01:19 +01:00 |
|
Stefan Harmuth
|
1c87545892
|
AOCDay.getInput() always return a copy, never a reference to self.input
|
2021-12-03 06:56:17 +01:00 |
|
Stefan Harmuth
|
d0c5e319fb
|
more type annotations
|
2021-12-02 06:22:33 +01:00 |
|
Stefan Harmuth
|
c7b8c6ead6
|
type annotations
|
2021-12-02 06:21:27 +01:00 |
|
Stefan Harmuth
|
ef0da77133
|
aoc.splitline(): allow return fields to have different types
|
2021-12-02 06:20:34 +01:00 |
|
Stefan Harmuth
|
b8e54f51f5
|
better compare(), especially now it's doing what's expected (and documented)
|
2021-12-02 05:17:29 +01:00 |
|
Stefan Harmuth
|
5e3d5d1156
|
streamline input getting
|
2021-12-01 02:49:15 +01:00 |
|
Stefan Harmuth
|
70dd7657ec
|
tools.compare(): a <> b => -1/0/1
aoc.printSolution(): better readable test output
|
2021-12-01 02:30:04 +01:00 |
|