0
How can we randomly put 'a','b','c', '0' in a matrix with srand or any other functions?
2 odpowiedzi
0
I saw your question and tried some things.
If you really only want 'a', 'b', 'c' and '0', the code can get much simpler.
https://code.sololearn.com/cYMtEn2BzZ1H/?ref=app
0
I want to code and make a game in which there are some buildings (b), soldiers (s),
cars (s) and '0' randomly in matrix.people should enter a row and col .between that coordinates and the 8 nearest elements, one should randomly choosen and will be aimed to shooted (if it is a building after 3 shoots, if it is a car after 2 shoots and if it is a soldier after 1 shoot will be destroyed completely) and chang to ' #'.the game will be finished when there are just '#' and '0' left in the field of warm (matrix).
I want help...