Lian had already found the company that manufactured the slot machines. Their office was only a short distance from the academy, which made things much easier.
After looking through the company's public information, he found the contact details of one of their managers and made a call.
He introduced himself as a new employee who had been assigned to work with the game development team on one of their upcoming slot games. He asked where the software team was located and who he needed to speak with about the project.
The manager he spoke to was busy and didn't think much of the call. She gave him the information he needed and mentioned a few employees who are working on the game's design and software.
Lian had found his target.
Now all he needed was a way to get inside and obtain the software.
An hour later, Lian had already walked inside the building. With the invisibility rune, he could simply turn invisible and walk through the front door.
Once inside, he waited for an employee to open one of the access doors and quickly walked in behind them before it closed.
Lian looked around. The office was busy. Employees moved between desks, carried files, talked near the coffee machines, and walked in and out of meeting rooms. Some were working at their desks, while others were walking around or talking to each other.
Lian stayed near the edge of the room, scanning the people around him.
He needed to find his target quickly, but there was one problem.
He only knew their names. He had no idea what they looked like.
And on top of that, the invisibility rune had a time limit. He was already running out of time, and he still hadn't found his target.
As Lian walked between the desks, he glanced at the ID cards on each employee's desk, looking for a familiar name.
He overheard one of them talking to the guy beside him.
"Hey, Terry, I told you to add the coin sound effect here and here. And the animation is also too slow. You haven't changed it yet?"
"Give me an hour. We still have a few days before the deadline."
Lian glanced at the man's ID card.
Found him.
Now all he needed was a small opportunity, or a distraction to do what he came here for without anyone noticing.
A few minutes later, a woman carrying a tray of tea and snacks walked past Terry's desk.
As she passed, Lian stuck his foot out.
She tripped, spilling tea all over Terry.
"Oh, I'm so sorry!" she said quickly, bending down to pick up the cups and cookies that had fallen onto the floor.
Terry looked down at his shirt.
"Oh, crap."
The guy sitting next to him grinned. "Come on, man. This is your chance. Go help her. You know what I mean."
Terry's face turned slightly red.
"What...?"
What the..? Lian thought.
While everyone was distracted, Lian plugged a USB into Terry's computer. A small terminal window popped up for a split second before disappearing.
Lian pulled the USB out and quietly walked away.
"Sorry again," the woman said, trying to wipe the tea from Terry's shirt.
"It's fine," Terry replied awkwardly.
By the time anyone looked around, Lian was already gone.
--
The next day, Lian and Nox were sitting in front of the computer, with the source code pulled up on the screen.
Nox stared at it for a moment.
"Okay, this looks a little like English, but I still don't understand shit. Anyway, how did you get this?"
"I found it on the dark web," Lian replied.
"Oh, cool. Let's see if we can find our principal's browsing history."
Lian ignored him and started explaining how the game worked.
"It's called roulette. Basically, they spin the wheel, throw a ball into it, and it lands on one of the red or black numbers.
"You can bet on a specific number, a color, or a group of numbers. If the result matches your bet, you win. The payout depends on what you bet on."
For example, betting on a single number pays 35 to 1. Betting on red or black, odd or even, or high or low pays 1 to 1. Stuff like that.
"The result of every spin is decided by a random number generator in the machine. This code controls it. If we can figure out how it generates the numbers and whether there's any pattern to it, we might be able to predict what comes next. But we'd need to understand all the math behind it first."
Nox looked at him. "So we need someone who's really good at math?"
"Yeah. Let's call Lin Ling."
About an hour later, Lin Ling was sitting with them as Lian explained everything they had figured out about the slot machine and its random number generator.
They already had the slot machine, the source code, and the exact algorithm it used to generate its results. That meant they didn't have to guess how the machine worked. They could study the random number generator itself and figure out how its starting state affected the numbers it produced.
Lin Ling replied "If we can figure out how the seed is generated and how the algorithm moves from one result to the next, we might be able to predict the results."
Lian nodded. "Then I'll make a program that tracks the machine's results and uses them to figure out where it is in that random sequence. Once we know that, it can predict when the result we want is most likely to appear and tell us when to spin."
Nox looked at Sunny. "Look at these nerds, nerding out."
They both started laughing.
Sunny grinned. "Let me know when you guys are going. I wanna check out the casino too."
"Don't believe him," Nox said. "He just wants to check out the girls there."
Lin Ling sighed. "Why did I even invite this guy?"
They spent the next few hours figuring out the math, then Lian made a program that used the previous results, matched them against possible points in the sequence, and estimated the probability of each result likely to come next.
They tested it on the old slot machine, comparing their predictions with the actual results and adjusting for the slight delay between seeing the signal and pressing the button.
One person watching the program while the other handled the machine.
"Alright, everything is ready. Tomorrow, me, Nox, and Sunny will go to the casino. Lin Ling will run the program and communicate with us through the earpiece."
Nox and Sunny nodded. "Alright."
Lin Ling frowned. "Why do I have to sit here? I wanna check out the casino too."
"Don't worry," Nox said. "After we win big tomorrow, we can all go there as many times as we want."
