Svenska
=======



Kompilering
-----------
*	`make dynamic` bygger:
	-	`libhnefatafl.so`
*	`make static` (förval) bygger:
	-	`libhnefatafl.a`

När man länkar statiskt så inkluderas `gleipnir_line`, `gleipnir_lines`
och `gleipnir_lineread` i objektarkivet. Man behöver alltså inte
installera Gleipnir för att Hnefatafl ska fungera. Däremot inkluderas
inte `gleipnir_*.h` i `hnefatafl.h`. `gleipnir_lang` används inte av
`core` (men det används av `uicx`).

Om man länkar dynamiskt så måste Gleipnir finnas i `LD_LIBRARY_PATH`.
Detta kan undvikas genom att bygga `core` med statisk länkning.



Hashtabell
----------
För att kompilera med hashtabellen måste man ändra följande i
`makefile`:

1.	`MACROS` måste innehålla `HNEFATAFL_ZHASH`.
2.	`OBJS` måste innehålla:
	-	`zhash/zhash.o zhash/zhasht.o`
3.	`HDRS` måste innehålla (i stället för raden med `gamet.h`;
	observera att ordningen inte får ändras):
	-	`gamet.h zhash/zhasht.h zhash/zhash.h`

Kör till sist `make hnefatafl.h` (kräver AWK).

### Kända fel ###
*	Hashtabellen gör datorspelaren långsammare av okänd anledning.
*	Hashtabellen känner inte till `forbid_repeat`-regeln. Den vet
	alltså inte om en position är förbjuden på grund av repetition
	när den lagrar positionen i minnet. Därför blir det ibland så
	att en position som lagras i minnet och tas fram senare leder
	till att datorspelaren gör annorlunda drag.



English
=======



Compiling
---------
*	`make dynamic` builds:
	-	`libhnefatafl.so`
*	`make static` (default) builds:
	-	`libhnefatafl.a`

Building with static linking includes `gleipnir_line`, `gleipnir_lines`
and `gleipnir_lineread` in the object archive. Thus you don't have to
install Gleipnir for Hnefatafl to work. However, `gleipnir_*.h` are not
included in `hnefatafl.h`. `gleipnir_lang` is not used by `core` (but it
is used by `uicx`).

If you link dynamically, then Gleipnir must be in `LD_LIBRARY_PATH`.
This can be avoided by building `core` with static linking.



Hashing
-------
If you want to compile with hashing, you have to change the following
things in `makefile`:

1.	`MACROS` must contain `HNEFATAFL_ZHASH`.
2.	`OBJS` must contain:
	-	`zhash/zhash.o zhash/zhasht.o`
3.	`HDRS` must contain (instead of the line with `gamet.h`; note
	that the order matters):
	-	`gamet.h zhash/zhasht.h zhash/zhash.h`

Finally run `make hnefatafl.h` (requires AWK).

### Known bugs ###
*	The hash table makes the computer player slower for unknown
	reasons.
*	The hash table is not aware of the `forbid_repeat` rule. Thus it
	doesn't know if a position is forbidden because of repetition
	when storing positions in memory. Therefore it sometimes happens
	that a position, which is stored in memory as a hash and
	retreived later, causes the computer player to make different
	moves.

