Somebody.. pls help

can anyone give me a code or a simple sample on a turn based game, anything will do, even constant opponents will do, just help me in the coding of hitting the guy and decrementing its hp and vice versa, pls, i’ve started with its coding, but im stuck at that part… :d: any help will do and thank you ./no1