Metadata-Version: 2.1
Name: cm2py
Version: 0.3.3
Summary: Circuit Maker 2 save generation and manipulation package
Author-email: SKM GEEK <qestudios17@gmail.com>
License: The MIT License (MIT)
        
        Copyright (c) Microsoft Corporation
        
        Permission is hereby granted, free of charge, to any person obtaining a copy 
        of this software and associated documentation files (the "Software"), to deal 
        in the Software without restriction, including without limitation the rights 
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 
        copies of the Software, and to permit persons to whom the Software is 
        furnished to do so, subject to the following conditions: 
        
        The above copyright notice and this permission notice shall be included in all 
        copies or substantial portions of the Software. 
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 
        SOFTWARE.
Project-URL: Homepage, https://github.com/QEStudios/cm2py
Project-URL: Bug Tracker, https://github.com/QEStudios/cm2py/issues
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE

# cm2py

cm2py is a Python package for generating and manipulating save strings for the roblox game [Circuit Maker 2](https://www.roblox.com/games/6652606416/Circuit-Maker-2).

## Installation

Use the package manager [pip](https://pip.pypa.io/en/stable/) to install cm2py.

```bash
pip install cm2py
```

## Usage

Basic program to generate a line of 8 looping OR gates:

```python
import cm2py as cm2

length = 8

save = cm2.Save()

blocks = []

for i in range(length):
    blocks.append(save.addBlock(cm2.OR, (i, 0, 0)))

### Commented out for clarity. 
### You should store connections in a list if you want to modify them later.
# connections = []  

for i in range(length):
    # connections.append(save.addConnection(blocks[i-1], blocks[i]))
    save.addConnection(blocks[i-1], blocks[i])  # Directly add the connections to the save object

saveString = save.exportSave()
print(saveString)
```
(from [the loop.py example](examples/loop.py))

## Contributing

Pull requests are welcome. For major changes, please open an issue first
to discuss what you would like to change.

## License

[MIT](https://choosealicense.com/licenses/mit/)
