There is a genre of Roguelike computer games starting with the original Rogue. Before 1980, computer games tended to be text adventures. In 1980 appeared Rogue, a game where your character explores the dungeon filled with dangerous monsters, trying to retrieve the Amulet of Yendor. Players experienced Rogue and later Roguelike games as ASCII art, somewhat like this:
----------- ###+..@......| |.......k.+ |.........| -----------
Yes, that is an underground room in the dungeon; # represents a dungeon corridor while + is a door. The human-controlled player is @, thus the commercial at sign is often a symbol of roguelike games. Here, K must be some kind of monster. For those first Rogue players on those BSD workstations, this was an innovation: previous games used textual descriptions, like "You are in an underground dungeon room. You see passages to the west and to the east. There is a kobold here!"
Programmers started to create similar games, and some of the Roguelike games gained more features; some even switched from ASCII text to color graphics. Roguelike games tended to attract fantasy elements, thus programmers had ideas to add Tolkien elements from The Hobbit and Lord of the Rings.
There was a free Rogue clone called "Hack", because the player could hack monsters to death. A team of developers on the Internet created a derivative called NetHack including features inspired by several sources of literature. Among the monsters of NetHack are Hobbits, Mordor orcs, and Uruk-hai. Among the items, there is an artifact weapon called Sting and several types of Mithril armor. However, NetHack includes monsters and objects from many other sources; it is said that the Elves of NetHack, being chaotic in nature, are very different from Tolkien's elves.
A different Rogue clone, the Game of Moria, borrowed more from Tolkien. In The Lord of the Rings, Moria is the underground city, formerly inhabited by dwarves but destroyed by a Balrog. In the game of Moria, the player does not search for the Amulet of Yendor, but instead enters the dungeon called "Moria" to kill the Balrog at the bottom.
It is the Game of Angband and its variants, though, that have the most features from Tolkien's Middle-earth. Angband started as a modified version of UMoria, the Unix version of Moria. In this game, the ultimate enemy is also the supreme bad god of Tolkien's universe, Morgoth. The goal, though, is to kill Morgoth deep inside the dungeon, not to destroy some One Ring. The well-organised Angband source code spawned many variants, including ToME, for "Troubles Of Middle-earth".